On Sat, Nov 8, 2008 at 3:42 AM, Simon J Mudd <[EMAIL PROTECTED]> wrote:
>
> One thought I had was to have an unless method/attribute in the file
> type which would allow us to disable the configured file behaviour:
>
> This seems like it would provide a nice easy way to run custom install
> scripts and only copy over the files once. The install script would
> clean up afterwards.

The file resource already has something like this in the replace parameter.

replace

Whether or not to replace a file that is sourced but exists. This is
useful for using file sources purely for initialization. Valid values
are true (also called yes), false (also called no).

Alternately, just add the 'refreshonly' parameter on the exec resource
so it only gets run if the installation script is replaced.

file { "/my/file":
   source => "/path/to/my/file",
   unless => "/usr/bin/test -d /final/install/directory",
   notify => Exec[install_script]
}

exec { "install_script":
   refreshonly => true
}

-- 
Joshua Timberman

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to