From ed36053476483546f5be67ee99e22b77ea6f9a37 Mon Sep 17 00:00:00 2001 From: Kenyon Ralph Date: Thu, 12 Oct 2023 22:38:47 -0700 Subject: [PATCH] plugins: avoid circular dependencies `include` the letsencrypt class instead of `require` it. Fixes #331. --- manifests/plugin/dns_cloudflare.pp | 2 +- manifests/plugin/dns_rfc2136.pp | 2 +- manifests/plugin/dns_route53.pp | 2 +- manifests/plugin/nginx.pp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/plugin/dns_cloudflare.pp b/manifests/plugin/dns_cloudflare.pp index f5f7d694..488a5714 100644 --- a/manifests/plugin/dns_cloudflare.pp +++ b/manifests/plugin/dns_cloudflare.pp @@ -23,7 +23,7 @@ Boolean $manage_package = true, Integer $propagation_seconds = 10, ) { - require letsencrypt + include letsencrypt if ! $api_key and ! $api_token { fail('No authentication method provided, please specify either api_token or api_key and api_email.') diff --git a/manifests/plugin/dns_rfc2136.pp b/manifests/plugin/dns_rfc2136.pp index 5c358945..094c8f5b 100644 --- a/manifests/plugin/dns_rfc2136.pp +++ b/manifests/plugin/dns_rfc2136.pp @@ -24,7 +24,7 @@ Stdlib::Absolutepath $config_dir = $letsencrypt::config_dir, Boolean $manage_package = true, ) { - require letsencrypt + include letsencrypt if $manage_package { package { $package_name: diff --git a/manifests/plugin/dns_route53.pp b/manifests/plugin/dns_route53.pp index 09a59337..27a1ac9b 100644 --- a/manifests/plugin/dns_route53.pp +++ b/manifests/plugin/dns_route53.pp @@ -12,7 +12,7 @@ Integer $propagation_seconds = 10, Boolean $manage_package = true, ) { - require letsencrypt + include letsencrypt if $manage_package { package { $package_name: diff --git a/manifests/plugin/nginx.pp b/manifests/plugin/nginx.pp index d63be1cc..a49f070d 100644 --- a/manifests/plugin/nginx.pp +++ b/manifests/plugin/nginx.pp @@ -6,7 +6,7 @@ Boolean $manage_package = true, String[1] $package_name = 'python3-certbot-nginx', ) { - require letsencrypt + include letsencrypt if $manage_package { package { $package_name: