Skipping callback 'oneline', as we already have a stdout callback. So the thing is that if you use ansiblebecometrue but your user is not set in sudoers that it can do passwordless sudo then you need to provide -K with his password. ansible-playbook playbook. I upgraded from Ansible v2.8.6 (which worked fine) to v2.9.0 and now I get 'Incorrect sudo password' when I run any playbook with become: yes in it. password (instead of ssh key), it is still possible to have the repository. I was just using my workstation and connecting to localhost. I cant imagine that would make a difference though. The only change I made was to the one to set the ansible user password and I just pasted the value in rather than include it from another file. ![]() This prompts the user to enter the sudo password at runtime. missing, but also any of the parent container paths. I tried both of your playbooks and they worked for me with ansible 1.9.2. Cool Tip: Ansible Playbook Print Variable. And append a line as follows: ansibleUserName ALL (ALL) NOPASSWD:ALL. Alternatively you can allow an Ansible user on a target machine to execute sudo without being prompted for a password for this on the target machine execute: sudo visudo. One common method is to use the -ask-become-pass flag during execution. Method 4: Disable Sudo Password for Ansible User. Building off g-roggemans solution, I was able to get this working on Debian 10, Ansible 2.9. ![]() It will ask for sudo password of remote host automatically. Skipping callback 'minimal', as we already have a stdout callback. 1 Add to your question the parsed sudo commands, the output of ansible -i inventory.yaml -m command -a 'sudo -list' -limit sudo config can be non-trivial, loading various files and even from ldap if configured, not to mention being sure to check the correct user on the correct host. To address the missing sudo password, Ansible offers several approaches. Simply Run your Command with following Ways. Ansible-playbook config file = configured module search path = '/usr/share/ansible/plugins/modules'] ansible python module location = ansible collection location = executable location = python version = 3.8.10 (default, Mar 13 2023, 10:26:41) jinja version = 3.0.3 libyaml = True Using as config file Skipping callback 'default', as we already have a stdout callback.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |