Installing packages with dependencies using puppet
You can try below manifest. The issue is that you have to add -f
and --allow-unauthenticated
options for apt-get
to resolve the dependencies automatically and install them. Once these flags are added it is not necessary to add each and every dependent package to the package
resource.
class mysql {
package { ["mysql-server-5.5"]:
ensure => present,
allowcdrom => 'true',
install_options => ['--allow-unauthenticated', '-f'],
}
}
From what I see you are using Ubuntu and therefore the Apt package manager. The error you are encountering is due to installing a package that it cannot find the public key for the package.
This can be because:
- You have a package source that does not contain the public keys.
- You need to do
apt-get update
to update your sources before doing an install. - Or you need to manually import the key.
You have two possible solutions:
- Import the key
- Ignore the missing key
-
Or use the following in Puppet to configure Apt to ignore missing keys.
class {'::apt': disable_keys: true}
The above require the PppetLabs Apt
module.
I would check the first options before disabling keys. You don't give enough details to have a precise cause/solution but the above should get you in the right direction.