Skip to content

Ensure EPEL is configured before installing plugin #222

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

Merged
merged 1 commit into from
Mar 29, 2020

Conversation

alexjfisher
Copy link
Member

I've noticed other PRs fail because puppet is trying to install the
dns_rfc2136 package before EPEL has been configured. The cleanest way of
fixing this seems to be to have the plugin class require letsencrypt.
There are only two resources in letsencrypt::plugin::dns_rfc2136
and the file resource already required Class['letsencrypt']. Now the
package resource will too.

The base class already contains letsencrypt::install and that
includes epel and configures the correct ordering.

I've noticed other PRs fail because puppet is trying to install the
dns_rfc2136 package before EPEL has been configured. The cleanest way of
fixing this seems to be to have the plugin class `require letsencrypt`.
There are only two resources in the `letsencrypt::plugin::dns_rfc2136`
and the `file` resource already required `Class['letsencrypt']`. Now the
`package` resource will too.

The base class already `contain`s `letsencrypt::install` and that
`include`s `epel` and configures the correct ordering.
@alexjfisher
Copy link
Member Author

Before this change...

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install python2-certbot-dns-rfc2136' returned 1: Error: Nothing to do

Full log:

Info: Applying configuration version '1585419866'
  Notice: /Stage[main]/Epel/File[/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7]/ensure: defined content as '{md5}58fa8ae27c89f37b08429f04fd4a88cc'
  Notice: /Stage[main]/Letsencrypt::Config/File[/etc/letsencrypt]/ensure: created
  Notice: /Stage[main]/Letsencrypt::Config/File[/opt/puppetlabs/puppet/cache/letsencrypt]/ensure: created
  Notice: /Stage[main]/Letsencrypt::Config/Ini_setting[/etc/letsencrypt/cli.ini server https://acme-staging-v02.api.letsencrypt.org/directory]/ensure: created
  Notice: /Stage[main]/Letsencrypt::Config/Ini_setting[/etc/letsencrypt/cli.ini email letsregister@example.com]/ensure: created
  Notice: /Stage[main]/Letsencrypt/File[/usr/local/sbin/letsencrypt-domain-validation]/ensure: defined content as '{md5}aef2b04a89ed35fabcc3ce4b2ae60e99'
  Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install python2-certbot-dns-rfc2136' returned 1: Error: Nothing to do
  Error: /Stage[main]/Letsencrypt::Plugin::Dns_rfc2136/Package[python2-certbot-dns-rfc2136]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install python2-certbot-dns-rfc2136' returned 1: Error: Nothing to do
  Notice: /Stage[main]/Epel/Epel::Rpm_gpg_key[EPEL-7]/Exec[import-EPEL-7]/returns: executed successfully
  Notice: /Stage[main]/Epel/Yumrepo[epel-testing]/ensure: created
  Info: Yumrepo[epel-testing](provider=inifile): changing mode of /etc/yum.repos.d/epel-testing.repo from 600 to 644
  Notice: /Stage[main]/Epel/Yumrepo[epel-testing-debuginfo]/ensure: created
  Info: Yumrepo[epel-testing-debuginfo](provider=inifile): changing mode of /etc/yum.repos.d/epel-testing-debuginfo.repo from 600 to 644
  Notice: /Stage[main]/Epel/Yumrepo[epel-testing-source]/ensure: created
  Info: Yumrepo[epel-testing-source](provider=inifile): changing mode of /etc/yum.repos.d/epel-testing-source.repo from 600 to 644
  Notice: /Stage[main]/Epel/Yumrepo[epel]/ensure: created
  Info: Yumrepo[epel](provider=inifile): changing mode of /etc/yum.repos.d/epel.repo from 600 to 644
  Notice: /Stage[main]/Epel/Yumrepo[epel-debuginfo]/ensure: created
  Info: Yumrepo[epel-debuginfo](provider=inifile): changing mode of /etc/yum.repos.d/epel-debuginfo.repo from 600 to 644
  Notice: /Stage[main]/Epel/Yumrepo[epel-source]/ensure: created
  Info: Yumrepo[epel-source](provider=inifile): changing mode of /etc/yum.repos.d/epel-source.repo from 600 to 644
  Notice: /Stage[main]/Letsencrypt::Install/Package[letsencrypt]/ensure: created
  Info: Class[Letsencrypt::Install]: Scheduling refresh of Exec[initialize letsencrypt]
  Notice: /Stage[main]/Letsencrypt::Renew/File[letsencrypt-renewal-hooks-puppet]/ensure: created
  Notice: /Stage[main]/Letsencrypt/Exec[initialize letsencrypt]: Triggered 'refresh' from 1 event
  Notice: /Stage[main]/Letsencrypt::Plugin::Dns_rfc2136/File[/etc/letsencrypt/dns-rfc2136.ini]/ensure: defined content as '{md5}98119d5f0c43ddf05a4d12ab4d073130'
  Info: Class[Letsencrypt::Plugin::Dns_rfc2136]: Unscheduling all events on Class[Letsencrypt::Plugin::Dns_rfc2136]
  Info: Stage[main]: Unscheduling all events on Stage[main]

@alexjfisher alexjfisher merged commit 7519fc6 into voxpupuli:master Mar 29, 2020
@alexjfisher alexjfisher deleted the missing_dependency branch March 29, 2020 11:48
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

Successfully merging this pull request may close these issues.

2 participants