On 2014-06-02 00:09, Tibor Malomsoki wrote:
apt-get update is work->
|exec { "apt-update":
command => "/usr/bin/apt-get update"
}
Exec["apt-update"] -> Package <| |>|
But now I want to run a complicated script (/etc/puppet/script/works.sh)
what do I write the site.pp that I run the script in the client
First, put the script into a module's "files" subdirectory, so it is
accessible via the puppet file server. Alternatively create a custom
mount point in fileserver.conf (see
http://docs.puppetlabs.com/guides/file_serving.html for details).
Then use this:
file { "/var/lib/puppet/script.sh":
source => "puppet:///modules/test/script.sh", # assuming you put it in the
'test' module
mode => 0755,
} ->
exec { "/var/lib/puppet/script.sh": }
Have fun, David
--
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/538C1716.8030200%40dasz.at.
For more options, visit https://groups.google.com/d/optout.