Hi.
I have multiple modules/classes used in site.pp manifest.
in site.pp i've some code like this:
Package <| title != 'yum-plugin-priorities' |> { require => Exec['clean_yum_cache'] }
Yumrepo<||> { before => Exec['clean_yum_cache'] }
exec { "clean_yum_cache":
command => "yum clean all",
path => "/sbin:/bin:/usr/sbin:/usr/bin",
}
in custom puppet type "A"(dsl, not ruby), which definded in site.pp i've code like this
if ! defined(Versionunlock[$::billing_rpm_name]) {
versionunlock { $::billing_rpm_name:
before => Package[$::billing_rpm_name],
}
versionlock { "${::billing_rpm_name}-${::cb_version}":
require => Package[$::billing_rpm_name],
}
}
* versionlock- my custom ruby provides for use yum versionlock plugin.
and in other manifest, included in type A, like this code:
package {$::billing_rpm_name:
ensure => $cb_version,
require => [Package['zeromq'],Yumrepo['addons']],
}
If at first I run puppet agent - package $::billing_rpm_name will not be updated, this package update only at secondry run puppet agent.
But I need that package to be updatet at first run puppet agent.
If i run custom manifest with this code:
package {$::billing_rpm_name:
ensure => $cb_version,
require => [Package['zeromq'],Yumrepo['addons']],
}
Package <| title != 'yum-plugin-priorities' |> { require => Exec['clean_yum_cache'] }
Yumrepo<||> { before => Exec['clean_yum_cache'] }
exec { "clean_yum_cache":
command => "yum clean all",
path => "/sbin:/bin:/usr/sbin:/usr/bin",
}
Package is updated immediately.
Please tell me what could be wrong?