Hi All,
I'm using the
ripienaar/concat<https://forge.puppetlabs.com/ripienaar/concat>module to manage
a number of configuration files. Is it possible for a
service to subscribe to the managed file so that when another module
inserts a fragment, the service is restarted?
Below is an example of what I'm trying to do. This fails with the
/etc/sysctl.conf
not being a valid resource reference for the subscription.
Thanks, Wayne.
# Class to manage /etc/sysctl.conf file
# Wayne Ingram
# 26/08/2013
#
class sysctl {
$config = "/etc/sysctl.conf"
service {
'boot.sysctl':
enable => true,
subscribe => $config;
}
concat{
$config:
owner => root,
group => root,
mode => '0444';
}
concat::fragment{
"sysctl_header":
target => $config,
source => 'puppet:///modules/sysctl/header',
order => 01;
"sysctl_body":
target => $config,
source => 'puppet:///modules/sysctl/standard',
order => 02;
"sysctl_seperator":
target => $config,
content => "#\n#\n#Below are managed by the sysctl puppet
class\n#\n",
order => 03;
"sysctl_footer":
target => $config,
content => "#\n# End of puppet managed config\n#\n",
order => 99
}
define register($value,$comment="",$order=50) {
concat::fragment{
"services_fragment_${name}":
target => $sysctl::config,
content => "${name} = ${value} \t\t# ${comment}
[${order}]\n",
order => $order;
}
}
}
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.