Ansible/First Instruction
Jump to navigation
Jump to search
Test to see if Ansible can access the machines
One must supply the following data points to enable Ansible to access the machines:
all
for all the machines listed in theinventory
file in the current working directory.-i
for input file, in this case, theinventory
file in the current working directory.--key-file
for the secret key file, in this case, the~/.ssh/ansible.pem
is the one that is shared with all the nodes.-u
for user name, in this case,ubuntu
is the user associated with the key file.-m
for module name, in this case,ping
is the module to be executed.
ansible all -i inventory --key-file ~/.ssh/ansible.pem -u ubuntu -m ping