Ansible Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 22: Line 22:
ansible <my-servers> -m copy -a "src=/root/ipa-ca.crt dest=/etc/origin/master"
ansible <my-servers> -m copy -a "src=/root/ipa-ca.crt dest=/etc/origin/master"
</pre>
</pre>
=ansible-playbook=
{{Internal|ansible-playbook|ansible-playbook}}

Revision as of 05:27, 17 October 2017

Internal

Ping all Hosts from a Group

This will also list the hosts from that group.

ansible all -m ping

Execute a Shell Command on all Hosts in Some Groups

ansible masters,nodes -m shell -a "systemctl status docker | grep Active"

Copy Files

ansible <my-servers> -m copy -a "src=/root/ipa-ca.crt dest=/etc/origin/master"

ansible-playbook

ansible-playbook