Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add become to tasks and handlers #333

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

svenkalinowski
Copy link
Contributor

@svenkalinowski svenkalinowski commented Oct 21, 2024

Added 'become: true' to every tasks where required.
Tested successfully on Debian bookworm.

Copy link

cla-bot bot commented Oct 21, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Sven Kalinowski.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@svenkalinowski
Copy link
Contributor Author

Successfully merging this pull request may close these issues: #337

@mkayontour
Copy link
Member

I would rather not add become to every action. There might someone using a privileged user which then always does an extra "become" for every task.
What's with become on the playbook level?

@Donien
Copy link
Collaborator

Donien commented Nov 18, 2024

Most of the Collection is made specifically to do administrative work. I, currently, don't see any spot where we'd need to distinguish between run as root and do this as a normal user.

If you don't want to use become for your whole play(book), you can also resort to another way of calling a role.

- name: Play
  become: false
  hosts: all
  roles:
    - name: icinga.icinga.icinga2
      become: true
    - some_other_role_without_become
    - name: explicit_no_become
      become: false

Switching the "global" become and the role's become also works just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants