Hi,

I have an interesting problem with groups and users.

Our puppet configuration is nice and modular so each application we wish to 
install has its own class.  For some applications we want to add existing 
users, created in another class to a new group.  Here's an example:

class App1 {
  package { "App1" ... }
  user { "app1user" : ... }
}

class App2 {
  package { "app2"
    requires => Package["app1"]  
  }
  group { "app2users" :
    ensure => present
  }
  user { name => "app1user"
    groups => "app2users"
  }
}

However puppet seems to balk doing this (even the first app) with:
  "Cannot alias User[app1inapp3] to app1user; resource User[app1user] 
already exist"

Just to add some extra complexity we also need to have two apps that extend 
the first one, like so:

class App3 {
  package { "app3"
    requires => Package["app1"]  
  }
  group { "app3users" :
    ensure => present
  }
  user { "app1inapp3" name => "app1user"
    groups => "app3users"
  }
}

To get around this we have dumped everything in the app1user definition but 
this isn't very modular as machines that have no App2 or App3 end up with 
their user groups everywhere.

Is there an alternative approach that I'm missing?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to