Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- #
- # Filename : getfacts.yml
- # Date : 15 Dec 2017
- # Author : Balaji Venkataraman (xbalaji@gmail.com)
- # Description : get facts about hosts
- #
- # Usage:
- # run this playbook against specific host(s) as follows:
- #
- # ansible-playbook -i "decdappgenlc347," --ask-vault-pass getfacts.yml
- #
- - name: get the facts about a server
- hosts: all
- vars:
- ansible_ssh_user: root
- ansible_ssh_pass: "XXXXXX"
- tasks:
- - name: print gathered facts
- debug:
- msg:
- - "{{ hostvars[inventory_hostname] }}"
Add Comment
Please, Sign In to add comment