I don't think subnet will work, but i'm not really sure. Maybe someone else can advise
You might be better off use has_ip_network in Puppet stdlibs [1] ? Obviously you'll need to edit the Puppet class every time you want to change the logic though. [1] https://forge.puppet.com/puppetlabs/stdlib/readme#has_ip_network Sean On Mon, Jul 4, 2016 at 12:54 PM, Nikos Zaharioudakis <[email protected]> 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 > > NETMASK=255.255.252.0 > BROADCAST=10.48.55.255 > NETWORK=10.48.52.0 ---> this is the matcher looking for. > > I have tried subnet=10.48.52.0 but it doesn't pickup between the objects > in the Order list, even though I added it there. > > subnet > fqdn > hostgroup > os > domain > > Are you aware of the name that needs to be there ? Perhaps > subnet is a non existent Variable. Mr foreman version in 1.7 > > Best regards, > > Nikos > > -- > 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. > -- 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.
