The class (in init.pp):
class users {
$system_users = hiera('system_users')
$system_groups = hiera('system_groups')
create_resources("@users::mkuser",$system_users)
create_resources("@users::mkgroup",$system_groups)
} # class users
The define (in mkuser.pp):
define users::mkuser (
$uid,
$gid = undef,
$group = undef,
$shell = '/bin/bash',
$home = undef,
$ensure = 'present',
$managehome = true,
$dotssh = 'ensure',
$comment = 'created via puppet',
$groups = undef,
$password = undef,
$symlink = undef,
$mode = undef
) {
<SNIP>
}
The error:
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
could not create resource of unknown type @users::mkuser at
/etc/puppetlabs/puppet/configurations/se/environments/development/modules/users/manifests/init.pp:29
Is this the expected behavior, or have I missed something obvious?
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> <javascript:;>.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com <javascript:;>.
Create_resources doesn't support virtual users, but Hiera DOES support hash-merging, so it could find all users in all hierarchies with hiera_hash and then declare them at once.