pvc-ansible/roles/pvc/tasks/automirror/enable.yml

24 lines
456 B
YAML
Raw Permalink Normal View History

2024-11-15 01:51:04 -05:00
---
- name: install automirror systemd units
template:
src: "automirror/pvc-automirror.{{ item }}.j2"
dest: "/etc/systemd/system/pvc-automirror.{{ item }}"
loop:
- timer
- service
register: systemd
- name: reload systemd to apply changes
command: systemctl daemon-reload
when: systemd.changed
- name: enable timer units
systemd:
name: "{{ item }}"
state: started
enabled: true
loop:
- pvc-automirror.timer