FAQ
I'm currently defining nagioscontacts one-by-one like so;

         @@nagios_contact { username1:
          ensure => present,
          use => "generic-contact",
          contact_name => username1,
          alias => "user1",
          email => "emailaddress1",
          target => "/etc/nagios/conf.d/contacts/username1.cfg",
         notify => Exec["fix_nagios_perms"]
       }

       @@nagios_contactgroup { groupname1:
          ensure => present,
          contactgroup_name => groupname1,
          alias => group1,
          members => "members1",
          contactgroup_members => "",
          target => "/etc/nagios/conf.d/contactgroups/groupname1.cfg",
         notify => Exec["fix_nagios_perms"]
         }

And generating them with;

         Nagios_contactgroup <<||>>
         Nagios_contact <<||>>

Is there a way to create a list such as ;
name1:username1:emailaddress1
name2:username2:emailaddress2

And "loop" the creation?

--
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 puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Jakov Sosic at Jul 22, 2013 at 12:53 pm

    On 02/11/2013 02:23 PM, JamieC wrote:

    And generating them with;

    Nagios_contactgroup <<||>>
    Nagios_contact <<||>>

    Is there a way to create a list such as ;
    name1:username1:emailaddress1
    name2:username2:emailaddress2

    And "loop" the creation?
    Puppet doesn't support loops in it's declarative language. You should
    write a defined type, and pass it an array.

    --
    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 puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedFeb 11, '13 at 1:23p
activeJul 22, '13 at 12:53p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Jakov Sosic: 1 post JamieC: 1 post

People

Translate

site design / logo © 2022 Grokbase