I haven't done it, but in your situation I would do something generically like
this:
ls | create_yaml_array.rb >/path/to/hiera/nodes/myserver.yaml
---
cats:
concat1:
bits:
- bit1
- bit2
- bit3
path: '/path/to/file1'
Then add a define somewhere to use with create_resources(), and inside that
define have each resource notify your exec. That way if any resources are
created/updated they'll fire off the exec. You'll need to build in
ensure=>absent support in the define, of course.
define ($bits, $path) {
file_concat { $title:
ensure => present,
# other stuff here
}
exec { 'allow_input_file_read':
command => "/usr/bin/setfacl -R -m u:logstash:rwx ${path}",
subscribe => File_concat[$title],
refreshonly => true,
}
}
Not a good example since I haven't used file_concat or logstash myself, but
that's where I'd start.
On Mon, Aug 04, 2014 at 04:36:06AM -0700, Brian Wilkins wrote:
> Rather than typing out hundreds of files that logstash has to monitor and
> put it into my profiles::logstash::acl class, how are others maintaining
> the actions to set the ACLs on files that logstash has to monitor? Right
> now, I am doing this for every file that logstash has to monitor:
>
> exec { 'allow_input_file_read':
> command => "/usr/bin/setfacl -R -m u:logstash:rwx <path>",
> subscribe => File_concat['ls-config'],
> refreshonly => true,
> }
>
> I monitor the changes to the configuration template that is maintained by
> the puppet forge logstash class so that the ACL is applied or re-applied
> when the logstash configuration changes.
>
> How are others doing this?
>
> --
> 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 [1][email protected].
> To view this discussion on the web visit
>
> [2]https://groups.google.com/d/msgid/puppet-users/fdd179e7-a3e4-4819-9173-b749d2540121%40googlegroups.com.
> For more options, visit [3]https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:[email protected]
> 2.
> https://groups.google.com/d/msgid/puppet-users/fdd179e7-a3e4-4819-9173-b749d2540121%40googlegroups.com?utm_medium=email&utm_source=footer
> 3. https://groups.google.com/d/optout
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/20140804134754.GA30986%40iniquitous.heresiarch.ca.
For more options, visit https://groups.google.com/d/optout.