Skip to content
Snippets Groups Projects
Commit 8db48db3 authored by Hannes Braun's avatar Hannes Braun :upside_down:
Browse files

Fixed multiple format warnings from lint

parent 6faf05d7
No related branches found
No related tags found
No related merge requests found
timers: timers:
# timername: # timername:
# timer_precommand: pre-command before command (well done sherlock) # timer_precommand: pre-command before command (well done sherlock)
# timer_command: which command or script to execute # timer_command: which command or script to execute
# timer_user: under which users the timer_command is executed. Default: root # timer_user: under which users the timer_command is executed. Default: root
# timer_OnCalendar: "*-*-* *:*:*" for example: *-*-* *:*:00 -> every minute # timer_OnCalendar: "*-*-* *:*:*" for example: *-*-* *:*:00 -> every minute
# Day Of the week Year-Month-Date Hour:Minute:Second # Day Of the week Year-Month-Date Hour:Minute:Second
# timer_AccuracySec: Timer have a default accuracy of round about one minute. You can set the accuracy with this var. # timer_AccuracySec: Timer have a default accuracy of round about one minute. You can set the accuracy with this var.
# timer_persistent: Takes a boolean argument. If true, the time when the service unit was last triggered is stroed on disk. When the timer is activated, # timer_persistent: Takes a boolean argument. If true, the time when the service unit was last triggered is stroed on disk. When the timer is activated,
# the service unit is triggered immediately if it would have been triggered at least once during the time when the timer was inactive. # the service unit is triggered immediately if it would have been triggered at least once during the time when the timer was inactive.
# This is useful to catch up on missed runs of the service when the machine was off. # This is useful to catch up on missed runs of the service when the machine was off.
# Note that this setting only has an effect on timers configured with OnCalendar=.Defaults to false. # Note that this setting only has an effect on timers configured with OnCalendar=.Defaults to false.
# timer_OnActiveSec: relative time after the timer unit was last activated # timer_OnActiveSec: relative time after the timer unit was last activated
# timer_OnBootSec: Relative time after the computer was booted # timer_OnBootSec: Relative time after the computer was booted
# timer_OnStartupSec: Relative time after systemd was started # timer_OnStartupSec: Relative time after systemd was started
# timer_OnUnitActiveSec: Relative time after the service unit was last activated # timer_OnUnitActiveSec: Relative time after the service unit was last activated
\ No newline at end of file
--- ---
- name: Upload files and enable timer - name: Upload files and enable timer
block: block:
- name: Uploading service file - name: Uploading service file
template: template:
src: service.j2 src: service.j2
dest: "{{ systemd_base_path | default('/etc/systemd/system') }}/{{ item.key }}.service" dest: "{{ systemd_base_path | default('/etc/systemd/system') }}/{{ item.key }}.service"
owner: "{{ item.value.timer_user | default('root') }}" owner: "{{ item.value.timer_user | default('root') }}"
group: "{{ item.value.timer_user | default('root') }}" group: "{{ item.value.timer_user | default('root') }}"
mode: 0644 mode: 0644
with_dict: "{{ timers }}" with_dict: "{{ timers }}"
- name: Uploading timer file - name: Uploading timer file
template: template:
src: timer.j2 src: timer.j2
dest: "{{ systemd_base_path | default('/etc/systemd/system') }}/{{ item.key }}.timer" dest: "{{ systemd_base_path | default('/etc/systemd/system') }}/{{ item.key }}.timer"
owner: "{{ item.value.timer_user | default('root') }}" owner: "{{ item.value.timer_user | default('root') }}"
group: "{{ item.value.timer_user | default('root') }}" group: "{{ item.value.timer_user | default('root') }}"
mode: 0644 mode: 0644
with_dict: "{{ timers }}" with_dict: "{{ timers }}"
- name: Enabling timers - name: Enabling timers
systemd: systemd:
name: "{{ item.key }}.timer" name: "{{ item.key }}.timer"
state: restarted state: restarted
enabled: true enabled: true
masked: false masked: false
scope: "{{ systemd_scope | default('system') }}" scope: "{{ systemd_scope | default('system') }}"
with_dict: "{{ timers }}" with_dict: "{{ timers }}"
notify: Reload systemd notify: Reload systemd
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment