You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
become does not work in podman containers.
I use containers to test my playbooks before deploying them. One part of the configuration is setting up user's password (which is securely stored in git secrets). But it looks like podman connection does not support become plugin and I cannot fully test that part of the config.
Initially I created an issue in ansible repo, but it looks like this should be a feature request here: ansible/ansible#80254
ansible-playbook -i inventory.yaml container.yaml
ansible-playbook -i inventory.yaml bootstrap.yaml
ansible-playbook -i inventory.yaml -e "ansible_sudo_pass=123" becoming.yaml # -K flag does not work either
Describe the results you received:
» ansible-playbook -i inventory.yaml container.yaml
PLAY [Create test linux container] **************************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] **************************************************************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Spin up example_container] ****************************************************************************************************************************************************************************************************************************************
changed: [localhost]
PLAY RECAP **************************************************************************************************************************************************************************************************************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
» ansible-playbook -i inventory.yaml bootstrap.yaml
PLAY [Bootstrap hosts] **************************************************************************************************************************************************************************************************************************************************
TASK [Install python] ***************************************************************************************************************************************************************************************************************************************************
changed: [example_container]
TASK [Install sudo] *****************************************************************************************************************************************************************************************************************************************************
changed: [example_container]
TASK [Add some user] ****************************************************************************************************************************************************************************************************************************************************
changed: [example_container]
PLAY RECAP **************************************************************************************************************************************************************************************************************************************************************
example_container : ok=3 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
» ansible-playbook -i inventory.yaml -e "ansible_sudo_pass=123" becoming.yaml
PLAY [Try escalate privileges] ******************************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] **************************************************************************************************************************************************************************************************************************************************
ok: [example_container]
TASK [Install gnupg] ****************************************************************************************************************************************************************************************************************************************************
fatal: [example_container]: FAILED! => {"changed": false, "module_stderr": "[sudo via ansible, key=gvjksipvifpoyeevvprxmoplwxpzrkmd] password:\nsudo: no password was provided\nsudo: a password is required\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
PLAY RECAP **************************************************************************************************************************************************************************************************************************************************************
example_container : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Describe the results you expected:
Successful execution
Additional information you deem important (e.g. issue happens only occasionally):
Also see: ansible/ansible#80254
Version of the containers.podman collection: Either git commit if installed from git: git show --summary Or version from ansible-galaxy if installed from galaxy: ansible-galaxy collection list | grep containers.podman
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
become
does not work in podman containers.I use containers to test my playbooks before deploying them. One part of the configuration is setting up user's password (which is securely stored in git secrets). But it looks like podman connection does not support
become
plugin and I cannot fully test that part of the config.Initially I created an issue in ansible repo, but it looks like this should be a feature request here: ansible/ansible#80254
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Successful execution
Additional information you deem important (e.g. issue happens only occasionally):
Also see: ansible/ansible#80254
Version of the
containers.podman
collection:Either git commit if installed from git:
git show --summary
Or version from
ansible-galaxy
if installed from galaxy:ansible-galaxy collection list | grep containers.podman
Output of
ansible --version
:Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Playbok you run with ansible (e.g. content of
playbook.yaml
):see above
Command line and output of ansible run with high verbosity
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: