-
Notifications
You must be signed in to change notification settings - Fork 4
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
Migrate to systemd timers #97
base: master
Are you sure you want to change the base?
Conversation
be7cceb
to
3e7b792
Compare
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.
Nice idea, i hate cronjob already (after several years of systemd.timer)
roles/timer/tasks/main.yml
Outdated
register: template_result | ||
|
||
- name: Reload systemd | ||
command: systemctl daemon-reload |
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.
please use the ansible module for this:
https://docs.ansible.com/ansible/latest/modules/systemd_module.html#parameter-daemon_reload
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.
fixed
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.
nope ...
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.
@mortzu you asked for ... this task is unnecessary
9e5e567
to
558722b
Compare
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.
Still issues with the reload in roles/timer
roles/timer/tasks/main.yml
Outdated
register: template_result | ||
|
||
- name: Reload systemd | ||
command: systemctl daemon-reload |
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.
nope ...
roles/timer/tasks/main.yml
Outdated
with_items: | ||
- service | ||
- timer | ||
register: template_result |
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.
register: template_result | |
notify: reload systemd |
and something in roles/timer/handlers/main.yml
roles/timer/tasks/main.yml
Outdated
- name: Enable and start timer | ||
service: | ||
name: "{{ timer_name }}.timer" | ||
daemon_reload: yes |
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.
Here is already a daemon_reload
...
command: systemctl daemon-reload | ||
when: template_result.changed | ||
|
||
- name: Enable and start timer |
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.
Should we always enable and start the Timer?
Maybe a deployment of generic timers would be nice - ala:
update-fastd-blacklist@.service
where the variable %I
could be the {{ site_code }}
Unnötige |
UPS sorry, github war verwirrend - nope, kannst von mir aus nach ein test mergen |
Timers are easier to debug and give more control about the scheduling.
Timers are easier to debug and give more control about the scheduling.
TODO: Needs to be tested!