It will pop a request for password so im guessing it is waiting for interactive pass?
Also, I tried to use become with user “user” instead of root and it worked but changing hostname is require to use root.
If i use a simple play like this:
- name: "test play"
become: yes
shell: “ls -l”
It will work with inventory entry:
ansible_become_user=user
but if its user root (as it usually should be) it doesn't work.
Hello, im using ansible-libssh (changed from paramiko) and now playbooks that worked with paramiko have different behavior with ansible-libssh.
using:
playbook:
im getting this debug:
Now if i use this command that libssh user like that:
ssh root@10.0.0.1 'sudo -H -S -p "[sudo via ansible, key=oztusclwkalryowlokcecuiznderdetw] password:" -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-oztusclwkalryowlokcecuiznderdetw ; /usr/bin/python3.8 /home/user/.ansible/tmp/ansible-tmp-1723027001.008096-21354-99267291740428/AnsiballZ_hostname.py'"'"' && sleep 0'
It will pop a request for password so im guessing it is waiting for interactive pass? Also, I tried to use become with user “user” instead of root and it worked but changing hostname is require to use root. If i use a simple play like this:
It will work with inventory entry:
ansible_become_user=user
but if its user root (as it usually should be) it doesn't work.configuration files: Inventory file:
ansible.cfg: