From 01d12b1dec4338ff0d3ea69988f0b8dc4e109aff Mon Sep 17 00:00:00 2001 From: VC Date: Fri, 5 Jul 2024 11:53:35 +0200 Subject: [PATCH] feat: move CACHEDIR to general template --- roles/bittorrent/tasks/transmission.yml | 6 +++--- roles/ftp/tasks/main.yml | 8 ++++++++ .../files/CACHEDIR.TAG => templates/CACHEDIR.TAG.j2 | 0 3 files changed, 11 insertions(+), 3 deletions(-) rename roles/bittorrent/files/CACHEDIR.TAG => templates/CACHEDIR.TAG.j2 (100%) diff --git a/roles/bittorrent/tasks/transmission.yml b/roles/bittorrent/tasks/transmission.yml index 2e2cc74..9c2b55d 100644 --- a/roles/bittorrent/tasks/transmission.yml +++ b/roles/bittorrent/tasks/transmission.yml @@ -19,9 +19,9 @@ - Reload transmission - name: Add cachedir file - ansible.builtin.copy: - src: files/CACHEDIR.TAG + ansible.builtin.template: + src: CACHEDIR.TAG.j2 dest: /var/lib/transmission-daemon/downloads/CACHEDIR.TAG owner: debian-transmission group: debian-transmission - mode: '0755' + mode: '0644' diff --git a/roles/ftp/tasks/main.yml b/roles/ftp/tasks/main.yml index a32a9e4..1c7c98e 100644 --- a/roles/ftp/tasks/main.yml +++ b/roles/ftp/tasks/main.yml @@ -11,6 +11,14 @@ state: directory mode: 0755 +- name: Add cachedir file + ansible.builtin.template: + src: CACHEDIR.TAG.j2 + dest: /srv/ftp/CACHEDIR.TAG + owner: root + group: root + mode: '0644' + - name: Create upload directory ansible.builtin.file: path: /srv/ftp/upload diff --git a/roles/bittorrent/files/CACHEDIR.TAG b/templates/CACHEDIR.TAG.j2 similarity index 100% rename from roles/bittorrent/files/CACHEDIR.TAG rename to templates/CACHEDIR.TAG.j2