ArunRaja
Cadet
Cadet
  • 192 Views

Ipaddr filter options

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

 

 

Labels (1)
0 Kudos
1 Reply
_Komal_
Mission Specialist
Mission Specialist
  • 79 Views

Re: Ipaddr filter options

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 }}" 

 

0 Kudos
Reply
Loading...
Join the discussion
You must log in to join this conversation.