Hello all,
I'm trying to solve an issue with Puppet and I'm hoping you can help
guide
me. We have an internal YUM repository that we build/deploy to quite
frequently, and several of the artifacts we publish to that repository need
to be pushed out (via puppet) to servers a couple of times per day. All
of my servers are SLES or openSuse based, and thus use Zypper. My question
is, since the repository gets updated frequently and zypper doesn't refresh
repository indexes by itself, is there a way to force a zypper refresh
ALWAYS as the first task in a manifest?
I've tried adding an exec item in a sample machine's manifest and having
all the "packages" require it, but it isn't doing what I expect.
It never
seems to run the "refresh" prior to trying to install any packages.
Here
are a few snippets from my manifest structure:
in base.pp:
exec { zypper-refresh:
command => 'zypper --no-gpg-checks refresh',
path => ["/usr/bin", "/bin", "/sbin"],
}
package { "puppet":
ensure => installed,
require => Exec['zypper-refresh'],
}
package { "augeas":
ensure => present,
require => Package['puppet'],
}
package { "rubygem-ruby-augeas":
ensure => present,
require => Package['augeas'],
}
in test-server.pp (which inherits base.pp)
package { 'geany':
ensure => installed,
require => Exec['zypper-refresh'],
}
package { 'myjavamodule_xx':
ensure => installed,
require => Exec['zypper-refresh'],
}
etc.
Any suggestions?
--
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 puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/a98d4d09-c0a0-480e-8904-adf075179a8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.