Ansible Operations: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 15: | Line 15: | ||
<pre> | <pre> | ||
ansible masters,nodes -m shell -a "systemctl status docker | grep Active" | ansible masters,nodes -m shell -a "systemctl status docker | grep Active" | ||
</pre> | |||
=Copy Files= | |||
<pre> | |||
ansible <my-servers> -m copy -a "src=/root/ipa-ca.crt dest=/etc/origin/master" | |||
</pre> | </pre> |
Revision as of 18:07, 17 May 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"