I also use some other stuff in my nagios.pp to get puppet facts into
mcollective.
file { "/usr/lib/nagios/.mcollective/etc/facts.yaml":
mode=> "0644",
owner => "104",
group => "106",
loglevel => debug,
content => inline_template("<%= scope.to_hash.reject { |k,v| k.to
With in the class I used something like this to get the facts into my
nagios templates:
define host($ip = $::fqdn, $short_alias = $::fqdn, $hostgroup =
$::product_info, $product_domain = $::product_domain) {
case $product_info {
/OneProduct/: {
$nagios_cfgdir = "/usr/local/nagios/
On Wed, Jun 20, 2012 at 1:22 PM, Jakov Sosic wrote:
> > I'm puzzled as to why can't I just use $operatingsystemrelease, and what
> > do these two semicolons mean?
>
>
> Any ideas?! :) Anyone?!?!
http://docs.puppetlabs.com/guides/scope_and_puppet.html
-Jeff
--
You received this message becaus
The :: refer to scope, in this case it's saying "variables at the very top
scope of what puppet knows about". This is because you can have:
$::operatingsystem
$module::class::operatingsystem
And it's not sure which one you mean. By adding the :: you're making sure
it knows to check the fact and
On 06/18/2012 03:25 PM, Jakov Sosic wrote:
> Hi.
>
> I have the following facts available:
>
> # facter | grep oper
> operatingsystem => CentOS
> operatingsystemrelease => 6.2
>
> Now, if I wish to use conditionals on these facts, I have to do it like
> this:
>
> case $operatingsystem {}
> case
D'oh
On Jun 18, 2012, at 11:26 AM, Martin Alfke wrote:
> Hi,
>
> On 18.06.2012, at 17:14, Wolf Noble wrote:
>
>> Hi Jakov,
>>
>> the two semicolons locate these variables as being in top-scope/variables
>> outside of any specific module.
>
> please note that these are colons (:) no semicolons(
Hi,
On 18.06.2012, at 17:14, Wolf Noble wrote:
> Hi Jakov,
>
> the two semicolons locate these variables as being in top-scope/variables
> outside of any specific module.
please note that these are colons (:) no semicolons(;).
>
> otherwise it might be $modulename::variable
>
> Does that
Hi Jakov,
the two semicolons locate these variables as being in top-scope/variables
outside of any specific module.
otherwise it might be $modulename::variable
Does that help at all?
W
On Jun 18, 2012, at 8:25 AM, Jakov Sosic wrote:
> Hi.
>
> I have the following facts available:
>
> # fact
Hi.
I have the following facts available:
# facter | grep oper
operatingsystem => CentOS
operatingsystemrelease => 6.2
Now, if I wish to use conditionals on these facts, I have to do it like
this:
case $operatingsystem {}
case $::operatingsystemrelease {}
I'm puzzled as to why can't I just us