hi,

I'm a bit confused while passing a parameter to a definition i've
made.
My aim is to create a htpasswd file on my icinga server, using the
hashed passwords from my userlist. I only want to execute this on a
icinga server, not all my servers.

this is what i've got:

1st my node definition:
node default {
 class['users::userlist']:
   stage => main;
}
node nl14s0008-vm7 inherits default {
 include monitor
}
it includes this class:
class monitor($marktgroep='healthcare',$functie='Monitor en grapher')
{
  class {
    ['linuxlogo','motd']:
      stage => main;
    ['users::beheerserver']:
      functie => $functie,        #### this is where I expect to pass
my param
      stage   => main;
    "icinga::server":
      stage => main;
    "iptables":
      internal_if => 'eth0',
      stage => main;
  }
}

here my definition, notice the functie='' at the end:

define users::account($realname, $password, $uid, $othergroups=[],
$gid, $key='', $keytype='ssh-rsa', $name, $ensure=present, shell='/bin/
bash', managehome='true', allowdupe='false', homeprefix='/home',
$functie='' ) {

<SNAP> (this contains a lot of (for this matter) irrelevant text)

      if $functie == 'Monitor en grapher' {
        icinga::htpasswd {
          "$name":
            name     => $name,
            password => $password,
            ensure   => $ensure;
        }

In the icinga class I define a file

class users::beheerserver($functie='') {
  Users::Account <| (othergroups == 'pep' or othergroups ==
'healthcare') |>
}

oh, and I include this:
class users::userlist {
  include users::groups
  @users::account {
    "root":
      uid      => "0",
      gid      => "0",
      realname => "root",
      othergroups => ['healthcare','beheerders'],
      password => 'Here I've got a hashed passwd that should work in
my htpasswd as well as my shadow file';
}

however: the icinga::htpasswd thing never get's executed. why?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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.

Reply via email to