The "creates" attribute tells Puppet that the "command" attribute actually
creates a file, and that the Exec{} should not be run if that file exists.
You need to alter your command:
command => "rm -rf /root/essai/html;touch /root/essai/exec.txt"
On Wed, Aug 8, 2012 at 6:42 AM, Rost <[email protected]> wrote:
> Hi all,
>
> I'm trying to have the exec resource write a file after the command but it
> don't.
>
> here is the resource declaration
>
> class gepet {
> notify { 'begin':}
> file { '/root/essai/html':
> ensure => present,
> content => "Wrote By Yves Nton",
> notify => Exec['test'],
> }
> exec { 'test':
> path => "/usr/bin:/usr/sbin:/bin",
> cwd => "/root/essai",
> command => "rm -rf /root/essai/html",
> creates => "/root/essai/exec.txt",
> refreshonly => true
> }
> notify { 'end':
> require => File['/root/essai/html']
> }
> }
>
> suggestions ?
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/4u6oOxidJJUJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.