Last active
June 23, 2017 09:37
-
-
Save abhinavkorpal/76ba51cb3a5e289ec31d41439057afab to your computer and use it in GitHub Desktop.
Ansible Commands
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
sudo apt-get install software-properties-common | |
sudo apt-add-repository ppa:ansible/ansible | |
sudo apt-get update | |
sudo apt-get install ansible | |
ansible --version | |
ansible-playbook --version | |
ansible-galaxy --help | |
ansible --list-hosts all | |
sudo vi /etc/ansible/hosts | |
ansible -i dev --list-host all | |
ansible --list-hosts all | |
ansible --list-hosts "*" | |
ansible --list-hosts loadbalancer | |
ansible --list-hosts webserver | |
ansible --list-hosts db01 | |
ansible --list-hosts "app0*" | |
ansible --list-hosts database:control | |
ansible --list-hosts webserver[0] | |
ansible --list-hosts \!control | |
ansible -m ping all | |
ansible -m command -a "hostname" all | |
ansible -a "bin/false" all | |
ansible-playbook playbooks/hostname.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment