Add automirror support to Ansible
This commit is contained in:
23
roles/pvc/tasks/automirror/enable.yml
Normal file
23
roles/pvc/tasks/automirror/enable.yml
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
|
||||
- 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
|
||||
|
Reference in New Issue
Block a user