Skip to content

turcumihaiioan/ansible-role-system-systemd-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

system_systemd_timer

This role allows you to use the ansible.builtin.systemd and ansible.builtin.template modules to create/remove, enable/disable and start/stop systemd timer unit files. See the systemd.timer manual page.

Requirements

ansible >= 2.10

Role Variables

system_systemd_timer:
  first_entry:
    accuracysec: ...
    description: ...
    fixedrandomdelay: ...
    name: ...
    oncalendar: ...
    onclockchange: ...
    ontimezonechange: ...
    persistent: ...
    state: ...
    randomizeddelaysec: ...
    remainafterelaps: ...
    unit: ...
    wakesystem: ...
  second_entry:
    .
    .
    .
  .
  .
  .

Dependencies

None

Example Playbook

Create a plocate-updatedb timer:

- hosts: servers
  vars:
    system_systemd_timer:
      timer1:
        accuracysec: 20min
        description: Update the plocate database daily
        name: plocate-updatedb
        oncalendar: daily
        persistent: true
        randomizeddelaysec: 12h
  roles:
    - turcumihaiioan.system_systemd_timer

Remove a timer:

- hosts: servers
  vars:
    system_systemd_timer:
      timer2:
        name: fstrim
        state: absent
  roles:
    - turcumihaiioan.system_systemd_timer

License

GPL-3.0-only

Author Information

Role created by Turcu Mihai Ioan

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages