On Wed, 08 Sep 2010, Martin Langhoff wrote:
> 1 - With a high number of identical nodes, we are very precious about
> deploying the exact same sw package (rpm in this case) to all nodes.
> Can I declare an exact rpm version/revision in a packages[] section?
> Can I later update it with a later version and will it know to upgrade
> VIA YUM?

Yes, you can put a version number in the "require" parameter of a
package resource.  As somebody else said, it would be a good idea to
maintain your own package repository.

> 2 - Can I say "install this shellscript and run it once"? How?

There's no easy way to do exactly that, but you can easily achieve much
the same result if the script has a way of testing whether its work
needs to be done:

$script = "/some/dir/filename"
file { $script:
    ensure => file,
    owner => ..., group => ..., mode => ...,
    source => "puppet:///wherever",
}
exec { "run the script if necessary":
    command => "$script --really-do-it",
    onlyif => "$script --check-whether-it-needs-to-be-done",
    require => File[$script],
}

> 2a - Is there an ISConf-like facility that says "run it until it
> succeeds once"? [ Happy to use Makefiles, but if there's a
> Puppet-supported elegant way of doing it... ]

Again, no, but there are several alternatives.  To run the command
several times per puppet run, you can put a while loop in the "command"
parameter of a puppet exec resource, or write a wrapper script that
loops.  To run a command once per puppet run as long as it keeps
failing, but stop after it has been successful once, can use the
exec/onlyif technique.

I don't want to add anything to the answers others have given to the
remaining questions.

--apb (Alan Barrett)

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to