diff --git a/README.md b/README.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4aebf748ac585820cc69a68eb95a4da3f03a725a 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,37 @@ +# role-systemd-timer + +## Name + +Create systemd.service and systemd.timer units. + +## Description + +An ansible role to generate and activate systemd units according to your own needs. Just define your prefered defaults. + +## Installation + +Either refer to the role via a requirements.yml, dependencies inside a meta.yml or via cloning the repository. + +**Requirements.yml - Example** + +```yaml +--- +roles: + - name: role-systemd-timer + src: https://25_read_ansible_roles:glpat-5Ci385Nui9Uvyy8dQcuC@git.slub-dresden.de/ansible/referat25/role-systemd-timer.git + scm: git +``` + +```bash +ansible-galaxy install -r requirements.yml +``` + +## Usage + +Provide valid variables and include role inside your playbook. + +For variables see `defaults/main.yml`. + +## License + +For open source projects, say how it is licensed. \ No newline at end of file diff --git a/defaults/main.yml b/defaults/main.yml index e2bb6542fe94a1f10e2e0b001d0f0d9ba640f858..fd686f1c1d16babe0d888976e09dd8f3b8dc6fdc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,16 +1,16 @@ timers: - timername: - timer_precommand: # pre-command before command (well done sherlock) - timer_command: # which command or script to execute - timer_user: # under which users the timer_command is executed. Default: root - timer_OnCalendar: # "* *-*-* *:*:*" - # 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_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. - # 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. - timer_OnActiveSec: # relative time after the timer unit was last activated - timer_OnBootSec: # Relative time after the computer was booted - timer_OnStartupSec: # Relative time after systemd was started - timer_OnUnitActiveSec: # Relative time after the service unit was last activated \ No newline at end of file + # timername: + # timer_precommand: pre-command before command (well done sherlock) + # timer_command: which command or script to execute + # timer_user: under which users the timer_command is executed. Default: root + # timer_OnCalendar: "*-*-* *:*:*" for example: *-*-* *:*:00 -> every minute + # 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_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. + # 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. + # timer_OnActiveSec: relative time after the timer unit was last activated + # timer_OnBootSec: Relative time after the computer was booted + # timer_OnStartupSec: Relative time after systemd was started + # timer_OnUnitActiveSec: Relative time after the service unit was last activated \ No newline at end of file