- From: Joshua Timberman <
>
- To:
- Subject: [chef] Re: Nagios cookbook requires non-standard attributes within the "users" data bag for admins?
- Date: Thu, 22 Sep 2011 23:05:56 -0700
Hi Brad!
On Thu, Sep 22, 2011 at 2:52 PM, Brad Knowles
<
>
wrote:
>
27: use default-contact
>
28: contact_name <%= a['id'] %>
>
29: email <%= a['nagios']['email'] %>
>
30: }
>
31:
>
>
Correct me if I'm wrong, but is this template assuming that all admins
>
should get all nagios notices sent by e-mail? What if we have several
>
admins defined on the machine but who should not get the notices?
>
>
Assuming I'm correct, then shouldn't you test a['nagios']['email'] != nil
>
before you try to use it in an assignment on line 29, and if it is nil then
>
skip over this particular admin?
You're right, it probably should. Our use of the nagios cookbook is
closely coupled with the users cookbook, since both were used in our
own infrastructure for Hosted Chef. The test should actually be in the
recipe before it passes that variable into the template, so we reduce
the amount of logic embedded in the template.
Would you please open a ticket in the COOK project at
tickets.opscode.com if you have not done so already?
Thank you!
--
Opscode, Inc
Joshua Timberman, Director of Training and Services
IRC, Skype, Twitter, Github: jtimberman
Archive powered by MHonArc 2.6.16.