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

Add environment parameter to renew cron #288

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

gmenuel
Copy link
Contributor

@gmenuel gmenuel commented May 11, 2022

Pull Request (PR) description

This PR add an option for adding environment to the global renew cron, this is useful for example with the nginx certbot plugin which somehow can't find nginx if the PATH in the cron doesn't include /usr/sbin.

This PR is similar to #189 which doesn't seem really active.

This Pull Request (PR) fixes the following issues

Fixes: #250 (well kind of, it doesn't directly fix this, but it allows to add the PATH in the cron which will fix the problem).

@gmenuel gmenuel force-pushed the add-environment-cron branch 3 times, most recently from de10e62 to 6da637d Compare May 11, 2022 13:05
@hboetes
Copy link

hboetes commented May 23, 2022

Thanks!

Letsencrypt::Cron::Hour $cron_hour = $letsencrypt::renew_cron_hour,
Letsencrypt::Cron::Minute $cron_minute = $letsencrypt::renew_cron_minute,
Letsencrypt::Cron::Monthday $cron_monthday = $letsencrypt::renew_cron_monthday,
Variant[String, Array[String], Undef] $cron_environment = $letsencrypt::renew_cron_environment,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense for the type to default to an empty array and disallow Undef? I'm not sure if that makes a difference for the cron type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested with [] and it removed the environment if it was previously setted. With the option unset (or undef) it doesn't remove the environment. But I think that removing the environment might be the right thing to do.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested with [] and it removed the environment if it was previously setted. With the option unset (or undef) it doesn't remove the environment. But I think that removing the environment might be the right thing to do.

@gmenuel I wonder then if we should mark this as a breaking change, since it would remove manual changes to the cron job.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kenyon yes you are right, it is probably better to tag this as a breaking change.

@treydock treydock added the enhancement New feature or request label Nov 16, 2022
@DJClean
Copy link

DJClean commented Jul 18, 2023

Just a quick question, is there anything holding this PR back?
Running into issues where I need to set the PATH for this cron to add some dirs. Which this PR would solve
If there are issues I don't mind taking a look and trying to fix it.

manifests/renew.pp Outdated Show resolved Hide resolved
@gmenuel
Copy link
Contributor Author

gmenuel commented Feb 6, 2024

Merge conflicts resolved.

@kenyon kenyon merged commit 3a56788 into voxpupuli:master Feb 14, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recent update causes problems with the nginx plugin
7 participants