Open abitrolly opened 5 years ago
Create inventory and ping all hosts
ansible -i inventory all -m ping
Ping all hosts in internal network by connecting through machine with external IP
ansible -i inventory all --ssh-common-args='-o ProxyCommand="ssh -W %h:%p user@example.com"' -m ping
https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-configure-a-jump-host-to-access-servers-that-i-have-no-direct-access-to
Append my SSH key to all hosts from inventory
ansible -i inventory all -m authorized_key -a "user=ubuntu key='https://gitlab.com/abitrolly.keys'"
Create inventory and ping all hosts
Ping all hosts in internal network by connecting through machine with external IP
https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-configure-a-jump-host-to-access-servers-that-i-have-no-direct-access-to
Append my SSH key to all hosts from inventory