On Mon, Oct 17, 2011 at 3:03 PM, neubyr <neu...@gmail.com> wrote: > Hi, > > I am trying to set ACLs using exec resource in Puppet DSL as follows: > > <pre> > ... > ... > define :set_acl_userdir do > username = @name > user_dirname = dir + username > user_dirname_default = user_dirname + '_default' > exec user_dirname_default, :command => '/usr/bin/setfacl -d -m > m:username:rwx user_dirname' > end > ... > ... > > node 'default' do > users.each do |u| > mk_userdir u > set_acl_userdir u > end > end > </pre> > > I am getting following error when I run this script: > <pre> > Puppet::Parser::Compiler failed with error TypeError: can't convert > Hash into String on node > </pre> > > I am not sure how to use exec in Puppet DSL scripts. Any documentation > or example usage will be really helpful.
exec have namspace clashing, so you need to use create_resource :exec .... See: http://projects.puppetlabs.com/projects/1/wiki/Ruby_Dsl HTH, Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.