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 old notation
- debug:
- msg: >
- This host uses IP address {{ ansible_default_ipv4.address }}
- - name: show IP address the fancy way
- debug:
- msg: >
- This host uses IP address {{ ansible_facts['default_ipv4']['address'] }}
- - name: fancy old way
- debug:
- msg: >
- This host uses IP address {{ ansible_default_ipv4['address'] }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement