Hey thanks, I was just looking at the problem the wrong way, and that
totally makes sense.
Thanks again,
r
On 9/15/06, Luke Kanies <luke@madstop.com> wrote:>
> On Sep 15, 2006, at 3:31 PM, RijilV wrote:
>
> > Maybe I''ve missed the obvious way of doing this, but is there
an
> > easy way to do something only when a package is installed but not
> > updated? I''ve tried a few ideas but they all seem to be
heading
> > down the wrong path (tm). Thanks in advance.
>
> At this point, you can either respond to any event or no events.
>
> OTOH, you can set up your commands so they run based on other
> criteria. E.g., if you''re doing some kind of initialization, then
> add a check to see if the initialization has already been done:
>
> exec { "init-something":
> command => "/do/something or other",
> unless => "/something/is already done"
> }
>
> I use this to do all kinds of things like creating subversion
> repositories. Exec supports three separate checks,
''unless'', ''if'',
> and ''creates''. Here''s how I use
''creates'' to initialize a Trac
> instance:
>
> exec { "tracinit-$name":
> command => "trac-admin $tracdir initenv $name $db $repo
> $templates",
> path => "/usr/bin:/bin:/usr/sbin",
> logoutput => false,
> creates => $config
> }
>
> I know that trac-admin creates a clean config file, so I set the
> command up so it only runs if that config file does not yet exist.
>
> Is that sufficient for you?
>
> --
> Luke Kanies
> http://madstop.com | http://reductivelabs.com | 615-594-8199
>
>
> _______________________________________________
> Puppet-users mailing list
> Puppet-users@madstop.com
> https://mail.madstop.com/mailman/listinfo/puppet-users
>
_______________________________________________
Puppet-users mailing list
Puppet-users@madstop.com
https://mail.madstop.com/mailman/listinfo/puppet-users