Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement