-
Notifications
You must be signed in to change notification settings - Fork 47
Description
The module works fine for me, but the changes only get applied if I trigger a puppet run manually.
Is there any requirement for it to be hooked to a tty?
Every time I let it run by itself it fails with:
puppet-agent[1462]: (/Stage[main]/Cpan::Install/Package[gcc]/ensure) created
puppet-agent[1462]: (/Stage[main]/Cpan::Install/Package[perl-CPAN]/ensure) created
puppet-agent[1462]: (/Stage[main]/Cpan::Config/File[/usr/share/perl5/CPAN/Config.pm]) Skipping because of failed dependencies
puppet-agent[1462]: (/Stage[main]/Cpan/Anchor[cpan::end]) Skipping because of failed dependencies
It then does a bunch of other tasks and comes back to this:
puppet-agent[1462]: Installing cpan module Digest::MD5
puppet-agent[1462]: Forcing install for Digest::MD5
puppet-agent[9556]: Starting Puppet client version 7.18.0
puppet-agent[9629]: Run of Puppet configuration client already in progress; skipping (/opt/puppetlabs/puppet/cache/state/agent_catalog_run.lock exists)
puppet-agent[1462]: cpan Digest::MD5 failed with error code 2
Apparently it runs into a lock mid-run.
My resource block is the following:
class { 'cpan':
manage_config => true,
manage_package => true,
package_ensure => 'present',
local_lib => true,
}
[
'Digest::MD5',
'DBI',
'Template',
'MIME::Entity',
'MIME::Types',
'MD5',
'PDF::API2',
'PostScript::Simple',
'File::NFSLock',
'Mail::IMAPClient',
'Email::Valid',
'File::Slurp',
'Time::ParseDate',
].each |$package| {
cpan { $package:
ensure => 'present',
force => true,
}
}