Hi All,
I need a playbook to read the context in a file.
If the file has an valid IP address it should redirect as output in another file with the valid IP address.
Pls suggest how to use ipaddr filter options to create a playbook
Hey,
You can try the Jinga template module for coping and filterring the same.
Facts to get the IP
ip_address = "{{ ansible_default_ipv4.address }}/{{ ansible_default_ipv4.netmask }}"
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.