On Wednesday, May 21, 2014 1:58:22 PM UTC-5, Danny Roberts wrote: > > For some reason my Puppet install doesn't like that: > > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Syntax error at 'users'; expected ')' at > /etc/puppet/modules/company/manifests/sshkeys.pp:1 on node puppetmaster > Warning: Not using cache on failed catalog > Error: Could not retrieve catalog; skipping run > > As Doug acknowledged, that requires turning on the future parser, which PL does not recommend for production systems. But no sweat, you can do this with the conventional parser almost as easily. You need to grease the wheels with a defined type:
define company::user ($ensure = 'present') { user { $title: ensure => $ensure, gid => "company", home => "/home/${title}", managehome => true, shell => "/bin/bash", require => Group["company"] } } Then you can do this: class company::sshkeys ( users, ) { company::user { $users: } } That's as far as your example suggested you wanted to go, but do note that it does nothing to remove previously configured users that you no longer want. If that's a concern to you then you could consider purging unmanaged users via a Resources meta-resource. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5f9a945a-8473-490c-9166-38163c561e17%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.