FAQ
I am doing something like that:

class users::userlist {

@users::virtual::localuser { "ubuntu":
sshkey => {
'test_key' => { key => 'XX' },
'test_key2' => { key => 'YY'},
,}
groups => 'test_group',
}

}

All is good whenever I just
do realize(Users::Virtual::Localuser['ubuntu']), but lets say I would like
to append some more keys later on in another subclass,

class users::specific inherits users:userlist {
realize (Users::Virtual::Localuser['ubuntu'])
Users::Virtual::Localuser['ubuntu'] {
sshkey +> {
'test_key3' +> { key => 'ZZ'},
}
}
}

*I am getting: Error 400 on SERVER: can't convert nil into Hash at
_create_resources invocation_*

The way I am propagating keys:

define localuser ($groups,$pass,$sshkey="",$homedir="/home/$title")

(...) CUT HERE (...)


$sshuser = { 'user' => $title }

if ( $sshkey != "" ) {
create_resources(users::virtual::sshkeys,$sshkey,$sshuser)
}

$sshuser = { 'user' => $title }

define sshkeys($key,$user,$state='present') {
ssh_authorized_key { "${title}_${user}":
ensure => "$state",
type => "ssh-rsa",
key => $key,
user => "$user",
require => User["$user"],
name => "$title",
}
}

Ideas?

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/wBHDxuSynp4J.
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.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJan 24, '13 at 2:26p
activeJan 24, '13 at 2:26p
posts1
users1
websitepuppetlabs.com

1 user in discussion

MCZ: 1 post

People

Translate

site design / logo © 2023 Grokbase