Running a command in an ansible-playbook from the ansible host using variables from the current ansible process
Date : March 29 2020, 07:55 AM
To fix this issue Having hit a brick wall with troubleshooting why one shell script is hanging when I'm trying to run it via Ansible on the remote host, I've discovered that if I run it in an ssh session from the ansible host it executes successfully. , Try with ansible_host: - name: Run script
local_action: 'shell ssh {{ ansible_host }} "/home/ansibler/script.sh"'
|
Why do my sudo commands work with ansible but not with ansible-playbook?
Tag : azure , By : Gerhard Miller
Date : March 29 2020, 07:55 AM
This might help you connection: local means execute every command on the localhost. Remove it from your playbook and try again.
|
Ansible playbook only working with root user and failing when running with other sudo user
Date : March 29 2020, 07:55 AM
around this issue I will suggest making for admin@10.16.24.102 and admin@10.165.240.103 sudo access without password: You can add to /etc/sudoers file: admin ALL=(ALL:ALL) NOPASSWD:ALL
|
run ansible playbook with sudo
Date : March 29 2020, 07:55 AM
|
How can I run commands in sudo mode with ansible playbook?
Date : March 29 2020, 07:55 AM
|