Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with automatic run #64

Open
daveopz opened this issue Dec 13, 2022 · 0 comments
Open

Problem with automatic run #64

daveopz opened this issue Dec 13, 2022 · 0 comments

Comments

@daveopz
Copy link

daveopz commented Dec 13, 2022

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,
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant