Hi , I have 3 servers serverA ,serverB , and serverC. >From serverA , I am trying to execute the playbook on serverB which is the control node(Where ansible is available).
The playbook when run from serverB(login with ssh) with executing as below works fine and got the expected output. # export ANSIBLE_HOST_KEY_CHECKING=False # ansible-playbook /home/ansible/playbook1.yml --limit serverC --key-file /home/ansible/priv_key.file The playbook has "become: true" >From ServerA , I am executing the below command using a bash script and the script works. But the execution is not happening #!/bin/bash ssh -i .ssh/serverb_key root@serverB "export ANSIBLE_HOST_KEY_CHECKING=False; ansible-playbook /home/ansible/playbook1.yml --limit serverC --key-file /home/ansible/priv_key.file" The requirement is to initiate the script from serverA - which will execute the playbook in serverB and do the changes in serverC. I even try with the "&" at the end to execute the ansible-playbook in the background ..but still the same result. ""export ANSIBLE_HOST_KEY_CHECKING=False; ansible-playbook /home/ansible/playbook1.yml --limit serverC --key-file /home/ansible/priv_key.file &" -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/591279df-3595-477f-a30f-dc86a4ea5959n%40googlegroups.com.
