I am a newbie to Ansible
. I have managed to write playbooks
that set up Apache
, Tomcat
and others, all on localhost. I am now trying to move this to other servers to test the playbooks.
I have done the following:
1. Added a section [webservers]
in /etc/ansible/hosts
and put the public IP for that instance there.
2. I invoked ansible-playbook
like so:
ANSIBLE_KEEP_REMOTE_FILES=1 ansible-playbook -vvvv -s serverSetup.yml
My questions:
1. Where do I store the public SSH key for the target server?
2. How do I specify which public key to use?