--- - name: "Rclone" tags: - rclone block: - name: "Rclone: Mountpoints" tags: - install file: path: "{{ item }}" state: directory owner: "media" group: "media" loop: - "/mnt/media" - "/mnt/GoogleDriveCrypt" - "/mnt/.media.cache" - "/mnt/.overlay.work" become: yes - name: "Rclone: Packages" tags: - install package: name: "rclone" state: latest become: yes - name: "Rclone: Configuration" tags: - config template: src: "templates/rclone.conf.j2" dest: "/srv/etc/rclone.conf" mode: "0600" owner: "media" group: "media" force: no become: yes - name: "Rclone: Configuration: FUSE" tags: - config lineinfile: path: /etc/fuse.conf regexp: "^#?user_allow_other" line: "user_allow_other" become: yes - name: "Rclone: Install: rclone service" tags: - install copy: dest: "/etc/systemd/system/rclone.service" src: "files/rclone.service" owner: "root" group: "root" mode: "0444" become: yes - name: "Rclone: Configure: rclone service" tags: - config systemd: name: rclone enabled: yes state: started become: yes - name: "Rclone: Install:/mnt/media mount" tags: - install copy: dest: "/etc/systemd/system/mnt-media.mount" src: "files/mnt-media.mount" owner: "root" group: "root" mode: "0444" become: yes - name: "Rclone: Configure: /mnt/media mount" tags: - config systemd: name: mnt-media.mount state: started become: yes