HI All
i've defined a hash like so:
ms::group:
msmdxgrp:
gid: 1203
and i'm trying to create a generic profiles which will create a unix group from that. i'm trying to prize myself away from create_resources by doing this:
class profiles::groups (
$groups_to_create,
) {
$groups_to_create.each |String $group| {
group { $group:
* => $group
}
}
}
so should that work? it doesn't at the moment as i get this:
Error 400 on SERVER: Syntax error at '=>' at /etc/puppetlabs/code/environments/tibcotommy/site/profiles/manifests/groups.pp:10:7
it's really because I'm refactoring everything for puppet 2016.1 and I'm led to believe that create\_resources is old skool and will probably become defunct. I've read reams and reams of documentation and examples of iteration but admittedly i can't find anything definitive for iterating through a hash with a method other than create\_resources.
↧