Last active
February 26, 2019 05:23
-
-
Save yv84/4172baa0e80a72011389137e0645a84b 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
yv84@yv84_u1:~/ansible$ cat ansible.cfg | |
[defaults] | |
host_key_checking = False | |
inventory=inventory.ini | |
yv84@yv84_u1:~/ansible$ cat hosts | |
[servers] | |
192.168.100.151 yv84=192.168.100.151 | |
yv84@yv84_u1:~/ansible$ cat inventory.ini | |
[s151] | |
ansible-target ansible_ssh_host=192.168.100.151 ansible_user=yv84 ansible_ssh_pass=password | |
yv84@yv84_u1:~/ansible/book_up_and_running$ ansible servers -m ping -vvv -i ./hosts --ask-pass --ask-become-pass -e 'ansible_python_interpreter=/usr/bin/python3' | |
192.168.100.151 | SUCCESS => { | |
"changed": false, | |
"invocation": { | |
"module_args": { | |
"data": "pong" | |
} | |
}, | |
"ping": "pong" | |
} | |
yv84@yv84_u1:~/ansible/book_up_and_running$ ansible --list-host all | |
hosts (1): | |
192.168.100.151 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment