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

Changed systemd unit creation from static to include_role

parent 5ed2d25d
No related branches found
No related tags found
No related merge requests found
[defaults]
roles_path = ../:
#roles_path = ../:
......@@ -9,3 +9,6 @@ simple_backup_config:
nfs_mount_path: # The path where the nfs will be mounted
nfs_server: # The nfs server ip address
nfs_volume_path: # The volume the nfs is placed on the nfs server
timers:
simple-backup:
---
collections:
- name: role-systemd-timer
source: https://git.slub-dresden.de/slub-referat-2.5/ansible/role-systemd-timer.git
type: git
......@@ -22,31 +22,8 @@
group: root
mode: '0644'
become: true
- name: Upload files and enable timer
block:
- name: Uploading service file
ansible.builtin.copy:
src: files/etc/systemd/system/simple-backup.service
dest: /etc/systemd/system/simple-backup.service
owner: root
group: root
mode: 0644
- name: Uploading timer file
ansible.builtin.copy:
src: files/etc/systemd/system/simple-backup.timer
dest: /etc/systemd/system/simple-backup.timer
owner: root
group: root
mode: 0644
- name: Enabling timers
ansible.builtin.systemd:
name: "simple-backup.timer"
enabled: true
state: started
masked: false
scope: system
notify: Reload systemd
become: true
- name: Create systemd service and timer units
ansible.builtin.include_role:
name: role-systemd-timer
with_dict: timers
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment