Hello Group,

I am trying to use facts like interfaces and based on the available 
interfaces perform  a common task.

Please help me out for below:

1. How  strings from core facts and local variable can be compared?

For example if interfaces has "eth0, lo, .." and i want to match from it.


1. if ('lo' in $facts['interfaces'])     # it is not working but also no 
validation error.



2.    if  ! ($facts['interfaces'] in [ 'lo', 'ens160' ])   # it is not 
working but also no validation error.
       

is it possible to put a condition on facts existence itself? 

like if ipaddress_eth0 is then perform action from code/enter in loop.


Please help me out.
Also, Please suggest any links for future understanding.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/32b533b0-648c-4f04-b70a-880f3df91668%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to