Hello I am a newbie with puppet
I am trying to take a module I cobbled together to run a script
class mymodule::myscript {
file {
'myscript':
ensure => 'file',
source => 'puppet:///modules/mymodule/myscript.sh',
path => '/usr/local/bin/myscript.sh',
owner => 'root'
group => 'root'
mode => '755'
notify => Exec['confrm'],
}
exec {
'myscript':
command => '/usr/local/bin/myscript.sh',
refreshonly => true,
}
What I need to make is something that does the following
1. Install a set of files (if they are not there copy them)
2. check to see if a config file exists (if not copy them)
3. populate the config file with a variable from a custom fact
4. Check to see if my script is running (restart if its not running)
Any guidance is appreciated.
RG