mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-20 07:14:25 +02:00
30 lines
823 B
YAML
30 lines
823 B
YAML
- name: Fail if any backup_to_usb variable is empty
|
||
assert:
|
||
that:
|
||
- backup_to_usb_mount != ""
|
||
- backup_to_usb_target != ""
|
||
- backup_to_usb_source != ""
|
||
fail_msg: |
|
||
One or more of the configuration variables are empty!
|
||
Please set:
|
||
- mount
|
||
- target
|
||
- source
|
||
to non‑empty values in your configuration file.
|
||
|
||
- name: Copy backup script to the scripts directory
|
||
copy:
|
||
src: svc-bkp-loc-2-usb.py
|
||
dest: "{{ backup_to_usb_script_path }}"
|
||
owner: root
|
||
group: root
|
||
mode: '0755'
|
||
|
||
- name: Copy systemd service to systemd directory
|
||
template:
|
||
src: svc-bkp-loc-2-usb.service.j2
|
||
dest: /etc/systemd/system/svc-bkp-loc-2-usb.cymais.service
|
||
owner: root
|
||
group: root
|
||
mode: '0644'
|
||
notify: reload svc-bkp-loc-2-usb.cymais.service |