Created
July 8, 2014 14:44
-
-
Save ryosms/6159134aa1b734214651 to your computer and use it in GitHub Desktop.
AnsibleInventoryForVagrant
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
[normal] | |
vagrant ansible_ssh_host=192.168.33.10 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key | |
[loopback] | |
vagrant ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key | |
[ip_address] | |
192.168.33.10 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key | |
[loopback_ip] | |
127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key |
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
$ ansible vagrant -i hosts_test -m ping | |
vagrant | success >> { | |
"changed": false, | |
"ping": "pong" | |
} | |
$ ansible normal -i hosts_test -m ping | |
vagrant | success >> { | |
"changed": false, | |
"ping": "pong" | |
} | |
$ ansible loopback -i hosts_test -m ping | |
vagrant | success >> { | |
"changed": false, | |
"ping": "pong" | |
} | |
$ ansible ip_address -i hosts_test -m ping | |
192.168.33.10 | success >> { | |
"changed": false, | |
"ping": "pong" | |
} | |
$ ansible loopback_ip -i hosts_test -m ping | |
127.0.0.1 | success >> { | |
"changed": false, | |
"ping": "pong" | |
} | |
$ ansible 192.168.33.10 -i hosts_test -m ping | |
192.168.33.10 | success >> { | |
"changed": false, | |
"ping": "pong" | |
} | |
$ ansible 127.0.0.1 -i hosts_test -m ping | |
127.0.0.1 | success >> { | |
"changed": false, | |
"ping": "pong" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment