Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: all
- tasks:
- - name: show IP address
- debug:
- msg: >
- This host uses IP address {{ ansible_facts.default_ipv4.address }}
- - name: show IP address injected variables style
- debug:
- msg: THe IP address is {{ ansible_default_ipv4.address }}
- - name: show IP address preferred style
- debug:
- msg: The IP address is {{ ansible_facts['default_ipv4']['address'] }}
- - name: show IP addresses old way
- debug:
- msg: IP is {{ ansible_default_ipv4['address'] }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement