Hi,
I am trying to create a module where users should be defined in hiera, and code users create_resource
init.pp
class ipxusers (
$users = lookup({ name => 'ipxusers:users', value_type => Hash, default_value => 'undef' }),
)
{
unless $users == 'undef' {
notify { 'test':
message => "users: ${users}"
}
create_resources(user, $users)
}
}
I have the hiera file correctly set up I think
#nfs declare home server
nfs::nfs_home_server: 'stagelog'
ipxusers::users:
pab:
ensure: absent
uid: 500
comment: Pa Gar
but the puppet agent output is not god. User is not created altough the message I added into the class print the users values
[root@stagejenkins01 ~]# puppet agent -tv --environment=temp
Info: Using configured environment 'temp'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for stagejenkins01.ipx.com
Info: Applying configuration version '1496765082'
Notice: users: {pab => {ensure => absent, uid => 500, comment => Pa Gar}}
Notice: /Stage[main]/Ipxusers/Notify[test]/message: defined 'message' as 'users: {pab => {ensure => absent, uid => 500, comment => Pa Gar}}'
Notice: Applied catalog in 5.54 seconds
anyone can help me please to see what is wrong in here?
Regards
↧