We're using Foreman to manage puppet.  I'm trying to create a class that 
uses the default value of $::domain, for $dhcp_dnsdomain, unless the 
parameter is defined as a host parameter within Foreman.  For example:

class foreman_proxy (
  $dhcp_dnsdomain     = $::domain,
  $nameservers        = ['10.0.0.1',],
) {
    file { "/path/to/file":
        ensure => present,
        mode   => '0755',
        content => template("foreman_proxy/mytemplate.erb"),
    }
}

I'd like $dhcp_dnsdomain to default to the host's facter value of $::domain 
if no host parameter is specified in Foreman.  If $dhcp_dnsdomain is given 
in Foreman, I want that to be used instead of the default.  

In the example above, I'm unable to override $dhcp_dnsdomain by setting the 
corresponding value on the host in Foreman.  It always goes with the value 
of $::domain.

Is there a way to do this?

-- 
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/72be1946-cd9a-497a-b82c-a2473a459e2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to