W dniu poniedziałek, 23 lipca 2012 09:21:09 UTC+2 użytkownik Felix.Frank
napisał:
>
> This end could be trivially met by putting this class declaration in a
> scope that is present for all your nodes. Perhaps a "default" class or
> similar.
>
> The class parameter should be assigned directly from hiera. Failing
> that, just assign a "nagiosip" value in hiera an put a
>
> class { "nagios::host": ip => hiera("nagiosip") }
>
> in your global scope.
>
i don't want to define nagiosip - it should be inherited from fact (current
set IP address on given node). ie.
project A: $nagiosip = $ipaddress_bond0_1234
project B: $nagiosip = $ipaddress_bond0_1235
project C: $nagiosip = $ipaddress_eth2
project D: $nagiosip = $ipaddress_bond0_555
in our current setup we have:
class baseclass {
# this is class mandatory for every production node
.
.
include nagios::host
}
node projectA {
# production vlan for projectA is 1234
$nagiosip = $ipaddress_bond0_1234
}
node foo inherits projectA {
include baseclass
}
can we do that without global variables?
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/sG5AHi_z4nAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.