-
Notifications
You must be signed in to change notification settings - Fork 1
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
Make cron job parameter configurable #1
Conversation
defaults/main.yml
Outdated
@@ -2,6 +2,7 @@ | |||
postgresql_backup: | |||
enabled: false | |||
directory: '' | |||
cron: '30 03 * * *' |
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.
@alexlanz
do I need the quotes 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.
cron: '30 03 * * *' | |
time: '30 03 * * *' |
You don't need the quotes, but is also no problem if you leave them.
What do you think about giving the property a more specific name?
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 think cron
is actually more explicit then time
.
For example in Spring boot you can schedule jobs and they also name it cron:
@Scheduled(cron = "30 03 * * *")
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.
Ok, works for me
tasks/main.yml
Outdated
ansible.builtin.copy: | ||
src: files/postgres | ||
ansible.builtin.template: | ||
src: templates/postgres.j2 | ||
dest: /etc/cron.d/postgres |
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.
@alexlanz should we give the cron job a more explicit name? postgres-backup?
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.
Great idea
No description provided.