Created
July 22, 2017 12:28
-
-
Save sudheerchamarthi/fb673cbaa3b2e09ff8a3830cd80ff27c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
READ BELOW DOCS BY NEXT CLASSSSSSSSSSSSSSSSSSS | |
Installation - http://docs.ansible.com/ansible/latest/intro_installation.html#latest-release-via-yum | |
Inventory - http://docs.ansible.com/ansible/latest/intro_inventory.html | |
adhhoc commands - http://docs.ansible.com/ansible/latest/intro_adhoc.html | |
22-07-2017 | |
Sample Commands | |
ansible -i prod.inventory test -m "ping" | |
vim /etc/ansible/ansible.cfg | |
ansible -i prod.inventory all -m "ping" | |
ansible -i prod.inventory all -m shell -a "netstat -tunlp" | |
ansible -i prod.inventory all -m shell -a "netstat -tunlp" --become | |
ansible -i prod.inventory all -m shell -a "service httpd status" --become | |
ansible -i prod.inventory all -m shell -a "service sshd status" --become | |
ansible -i prod.inventory all -m shell -a "top" --become | |
ansible -i prod.inventory all -m shell -a "free -h" --become | |
ansible -i prod.inventory all -m shell -a "free -m" --become | |
ansible -i prod.inventory all -m copy -a "src=sample dest=/tmp/host backup=yes" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment