Last active
August 29, 2015 14:17
-
-
Save mihaiparv/834aa170f51690abfc3c to your computer and use it in GitHub Desktop.
Configuration management with Ansible - demo 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
# set-up authetication using the private key of the vagrant box | |
ssh-agent zsh | |
ssh-add .vagrant/machines/default/virtualbox/private_key | |
# test the connectivity / authentication | |
ansible all -i "192.168.120.10," -u vagrant -m ping | |
# ansible command line shell module basic usage | |
ansible all -i "192.168.120.10," -u vagrant -m shell -a "date" | |
ansible all -i "192.168.120.10," -u vagrant -m shell -a "uname -a" | |
# ansible command line apt module usage | |
ansible all -i "192.168.120.10," -u vagrant -m apt -a "pkg=git state=latest" --sudo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment