Initial posts to the list are moderated, so that would explain the delay (I 
see it now)...

There are two solutions to your question, but I think the easiest one is 
actually the best...

In your case rename your files to (for example) 10.18.101.0.yml and use - 
include_vars: "{{ ansible_default_ipv4.network }}.yml"

This WILL work for all networks that you have as when your netmask is not 
255.255.255.0 then the network itself will change.  The only time that you 
might have issues is if you (for some reason) have machines on the same 
physical network with different netmasks.  If that is the case then you 
should probably just fix your machines.

Here are some examples of  IP address 10.18.101.129 with different 
netmasks...
/8 10.0.0.0  (16,777,214 hosts)
/16 10.18.0.0 (65,534 hosts) 
/24 10.18.101.0 (254 hosts)
/25 10.18.101.128 (126 hosts)
/26 10.18.101.128 (62 hosts)

Note that the last two are identical because we are now at the start of the 
net block... 

Adam


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9aff128f-9be9-4b96-a200-abf26f9e2ba6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to