using defined resource type collections

11 views
Skip to first unread message

Richard Jacobsen

unread,
Sep 8, 2011, 6:56:30 PM9/8/11
to puppet...@googlegroups.com
Hello everyone,

I have a bunch of users as virtual defined resources, like this:

@user::virtual::localuser { 'testuser':
    uid => 12000,
    gid => 'users',
    shell => '/bin/bash',
    home => "/home/testuser",
    sshkey  => 'blah',
    mytag => ["linuxadmin","usergroup1"],

I'm using collections to manage which users get assigned to which hosts:
class user::linuxadmin inherits user::virtual {
       User::Virtual::Localuser <| mytag == "linuxadmin" |>
}

node 'lucidtester' {
include user::linuxadmins
}

I also have a bunch of storage partitions across various nodes  I'd like to create a directory for the user, change ownership, if that user is so tagged that way and the storage is tagged as well, say:

node 'lucidtester' {
storage::local { '/raid4': tag="usergroup1" }
include user::usergroup1
}

That way whenever I add a new storage resource or new user resource to a host, a directory, if appropriate, gets created.  Can anyone give me some pointers?

Thanks!
Richard
Reply all
Reply to author
Forward
0 new messages