--- - name: Install autofs pacman: name: borg state: present - name: copy udev rule in /etc/backups copy: src: files/dd_borg/40-backup.rules dest: /etc/backups/40-backup.rules backup: yes - name: Link it to /etc/udev file: src: /etc/backups/40-backup.rules dest: /etc/udev/rules.d/40-backup.rules state: link - name: copy service in /etc/backups copy: src: files/dd_borg/automatic-backup.service dest: /etc/backups/automatic-backup.service backup: yes - name: Link it to /etc/udev file: src: /etc/backups/automatic-backup.service dest: /etc/udev/rules.d/automatic-backup.service state: link - name: copy run scritp template: src: files/dd_borg/run.sh dest: /etc/backups/run.sh - name: Reload systemctl systemd: daemon_reload: yes - name: Reload udev shell: udevadm control --reload