This is necessary when required_packages contains GPG keys that are used for
authenticating other packages. Tested with package ubuntu-cloud-keyring which
is included in Ubuntu main and used by the Ubuntu Cloud Archive.
I think the same problem applies to other *-keyring packages as well.
logoutput => 'on_failure',
refreshonly => true,
subscribe => File["${name}.list"],
logoutput => 'on_failure',
refreshonly => true,
subscribe => File["${name}.list"],
+ before => Exec['apt_update'],
should contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({
"command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}",
"subscribe" => "File[#{title}.list]",
should contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({
"command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}",
"subscribe" => "File[#{title}.list]",
+ "refreshonly" => true,
+ "before" => 'Exec[apt_update]',
})
else
should_not contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({
})
else
should_not contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({