Executing Remote Ansible
Thu Apr 08 2021 21:05:36 GMT+0000 (Coordinated Universal Time)
Saved by
@nhatphan108
#Put this in playbook
- hosts: crispy.live
<<playbook contents here>>
#Create hosts file
[crispy.live]
ubuntu@server.com ansible_ssh_private_key_file=./tempcrispy.pem
#Change permission of host file
sudo chmod 600 /path/to/my/key.pem
#Run ansible
ansible-playbook -i hosts ./ansible/playbook.yml
content_copyCOPY
Comments