-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Labels
affects-0.3Issues related to 0.3.X Mitogen releasesIssues related to 0.3.X Mitogen releasesbugCode feature that hinders desired execution outcomeCode feature that hinders desired execution outcome
Description
According to ansible-lint the correct value for become_method su and sudo are the fully qualified names ansible.builtin.su and ansible.builtin.sudo (https://github.com/ansible/ansible-lint/blob/main/src/ansiblelint/schemas/ansible.json#L48)
Making the switch to these fully qualified names while using the Mitogen connection strategy produces the following error :
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'ansible.builtin.sudo'
fatal: [REDACTED]: FAILED! =>
msg: 'Unexpected failure during module execution: ''ansible.builtin.sudo'''
stdout: ''
Here is an example playbook that will reproduce the bug:
# test-playbook.yml
- hosts: localhost
tasks:
- name: Run a shell command
ansible.builtin.command: /bin/echo $(id -un)
become: true
become_user: nobody
become_method: ansible.builtin.sudoPR is here: #1072
Metadata
Metadata
Assignees
Labels
affects-0.3Issues related to 0.3.X Mitogen releasesIssues related to 0.3.X Mitogen releasesbugCode feature that hinders desired execution outcomeCode feature that hinders desired execution outcome