- name: Install transmission apt: pkg: - transmission-daemon - name: stop transmission systemd: state: stopped name: transmission-daemon - name: "Copy file with owner and permissions" copy: backup: yes src: "{{ playbook_dir }}/repo/transmission_settings" dest: /etc/transmission-daemon/settings.json owner: debian-transmission group: debian-transmission mode: '0600' - name: Create dir /data file: path: /data state: directory owner: root group: root mode: '0755' - name: Create dir /data/torrents file: path: /data/torrents state: directory owner: debian-transmission group: debian-transmission mode: '0755' - name: Create dir /data/torrents/_incomplete file: path: /data/torrents/_incomplete state: directory owner: debian-transmission group: debian-transmission mode: '0755' - name: Create dir /data/torrents/_watchdir file: path: /data/torrents/_watchdir state: directory owner: debian-transmission group: debian-transmission mode: '0755' - name: restart transmission systemd: state: restarted daemon_reload: yes name: transmission-daemon