Problem:
I cant get Ansible Playbooks running with the supplied sudo password under global settings.
As soon as I run a Playbook, where sudo / root permissions are required, e.g. installing packages, I get the following error:
...
4:
TASK [Gathering Facts] *********************************************************
5:
fatal: [hostname]: FAILED! =>
6:
msg: Incorrect sudo password
...
logs from auth.log
pam_unix(sudo:auth): conversation failed
Dec 11 16:33:00 hostname sudo: pam_unix(sudo:auth): auth could not identify password for [foreman]
Dec 11 16:33:00 hostname sudo: foreman : 1 incorrect password attempt ; TTY=pts/2 ; PWD=/home/foreman ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-nqcfxwiezfgjnjpjznjeobctbwycljby ; /usr/bin/python /home/foreman/.ansible/tmp/ansible-tmp-1576078372.7-191449271475326/AnsiballZ_setup.py
Remote Execution with “normal” SSH commands work fine, I can install packages, change configs. Therefore the sudo password from global settings seem to work atleast for “normal” SSH commands, but not for Ansible.
Global Remote Execution Settings
Effective User: root
Effective User Method: sudo
SSH User: foreman
Sudo password: password_in_plaintext
Authenification via SSH is done with pub/priv RSA key.
Expected outcome:
Use the sudo password from global settings.
Foreman and Proxy versions:
1.23.1
Foreman and Proxy plugin versions:
foreman_remote_execution: 1.8.2
katello: 3.13.3
foreman_ansible: 3.0.9
Other relevant data:
Am I missing something? Isnt the global sudo settings supposed to work with Ansible?
Thanks for your help