From e89441990bd2fb68e684729fd2e4be4214b0a395 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sat, 4 May 2024 13:21:15 +0300 Subject: [PATCH] Add check for defined --- manifests/init.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 83fc23a..be8520f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -360,9 +360,11 @@ class mastodon ( timeout => 0, require => File["${mastodon_home}/live/.env.production"], } - class { 'letsencrypt': - email => $cert_admin_mail, - renew_cron_ensure => 'present', + if (!defined(Class['letsencrypt'])) { + class { 'letsencrypt': + email => $cert_admin_mail, + renew_cron_ensure => 'present', + } } letsencrypt::certonly { $hostname: domains => [$hostname],