-
Notifications
You must be signed in to change notification settings - Fork 137
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 cron time parameters #122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
manifests/certonly.pp
Outdated
$cron_before_command = undef, | ||
$cron_success_command = undef, | ||
# 0 - 23, seed is title plus fqdn | ||
Variant[Integer, String, Array] $cron_hour = fqdn_rand(24, $title), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can limit it further by specifying Integer[0, 23]
. At least, I think that was inclusive. Also wondering if the Array
should be further specified. A similar comment applies to the minute parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add the limit to the integer field, the array I'm not so sure about...
Hi @matonb, could you rebase please? |
@bastelfreak rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it needs a new rebase :(
@matonb Thanks for the squash/rebase. Would you like to amend the final commit message though? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit, 👍 otherwise
README.md
Outdated
You can optionally add a shell command to be run on success using the `cron_success_command` parameter. | ||
You can optionally add a shell command to be run on before using the `cron_before_command` parameter. | ||
You can optionally specify one or multiple days of the month when to run the cron using the `cron_monthday` parameter (default is every day). | ||
To automatically renew a certificate, you can pass the `manage_cron` parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the trailing whitespace here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ekohl Added for newlines when renderd in markdown, is that a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of scripts and editors automatically strip trailing whitespace and it's also very hard to review. It's probably better to rewrite as a list:
manage_cron
can be used to automatically renew the certificatecron_success_command
can be used to run a shell command on a successful renewalcron_before_command
can be used to run a shell command before a renewal- ....
I've updated the README in the way suggested.
@matonb Thanks! Sorry for the delay in getting this in. |
@matonb Thank you. |
Accepts puppet cron type time attributes
Pull Request (PR) description
Enable user to define cron time attributes instead of defaulting to random time
This Pull Request (PR) fixes the following issues
#47 It doesn't fix this issue per-se but does allow users to specify more than one execution time