On 04/07/16 12:54, Nikos Zaharioudakis wrote: > Hi List ! > > I am trying to create a custom Smart Variable that will provide a > Default value, but I would like to override it with another value IF the > host belongs to a specific subnet. So I need to find the right matcher > for subnet. Eg should a host has the ip address 10.48.54.14/22 > <http://10.48.54.14/22> > > NETMASK=255.255.252.0 > BROADCAST=10.48.55.255 > NETWORK=10.48.52.0 ---> this is the matcher looking for.
The matcher currently uses the subnet *name*, network address and CIDR prefix as defined in Foreman. So if your subnet name was "Production", use a matcher of: subnet=Production (10.48.52.0/22) This will be changed in 1.13.0 to use the subnet name only. Ensure the host's network interfaces have the subnet set, they won't have it set automatically during fact imports. -- Dominic Cleal [email protected] -- You received this message because you are subscribed to the Google Groups "Foreman users" 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]. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
