From 4e6f18311d05b20fe6c234da1a36175c491fb6be Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sat, 5 Aug 2023 19:35:55 +0200 Subject: [PATCH] Use subfolders for templates as well --- roles/docker/tasks/services/byro.yml | 2 +- roles/docker/tasks/services/mailu.yml | 2 +- roles/docker/tasks/services/mastodon.yml | 2 +- roles/docker/tasks/services/matrix_element.yml | 4 ++-- roles/docker/tasks/services/rallly.yml | 2 +- roles/docker/tasks/services/restic_backup.yml | 4 ++-- roles/docker/templates/{byro.env.j2 => byro/env.j2} | 0 .../{element.config.json.j2 => element/config.json.j2} | 0 roles/docker/templates/{mailu.env.j2 => mailu/env.j2} | 0 roles/docker/templates/{mastodon.env.j2 => mastodon/env.j2} | 0 .../{matrix.homeserver.yaml.j2 => matrix/homeserver.yaml.j2} | 0 roles/docker/templates/{rallly.env.j2 => rallly/env.j2} | 0 .../templates/{restic.ssh.config.j2 => restic/ssh.config.j2} | 0 .../{restic.ssh.known_hosts.j2 => restic/ssh.known_hosts.j2} | 0 14 files changed, 8 insertions(+), 8 deletions(-) rename roles/docker/templates/{byro.env.j2 => byro/env.j2} (100%) rename roles/docker/templates/{element.config.json.j2 => element/config.json.j2} (100%) rename roles/docker/templates/{mailu.env.j2 => mailu/env.j2} (100%) rename roles/docker/templates/{mastodon.env.j2 => mastodon/env.j2} (100%) rename roles/docker/templates/{matrix.homeserver.yaml.j2 => matrix/homeserver.yaml.j2} (100%) rename roles/docker/templates/{rallly.env.j2 => rallly/env.j2} (100%) rename roles/docker/templates/{restic.ssh.config.j2 => restic/ssh.config.j2} (100%) rename roles/docker/templates/{restic.ssh.known_hosts.j2 => restic/ssh.known_hosts.j2} (100%) diff --git a/roles/docker/tasks/services/byro.yml b/roles/docker/tasks/services/byro.yml index 96f117ad..f7a41419 100644 --- a/roles/docker/tasks/services/byro.yml +++ b/roles/docker/tasks/services/byro.yml @@ -7,7 +7,7 @@ - name: Create env file template: - src: byro.env.j2 + src: byro/env.j2 dest: "{{ services.byro.volume_folder }}/env" - name: Deploy entrypoint file diff --git a/roles/docker/tasks/services/mailu.yml b/roles/docker/tasks/services/mailu.yml index 77df546a..168609a0 100644 --- a/roles/docker/tasks/services/mailu.yml +++ b/roles/docker/tasks/services/mailu.yml @@ -25,7 +25,7 @@ - name: upload mailu.env file template: - src: mailu.env.j2 + src: mailu/env.j2 dest: "{{ services.mailu.volume_folder }}/mailu.env" - name: hard link to Let's Encrypt TLS certificate diff --git a/roles/docker/tasks/services/mastodon.yml b/roles/docker/tasks/services/mastodon.yml index 38f94a9e..1c100cee 100644 --- a/roles/docker/tasks/services/mastodon.yml +++ b/roles/docker/tasks/services/mastodon.yml @@ -31,7 +31,7 @@ - name: Copy mastodon environment file template: - src: mastodon.env.j2 + src: mastodon/env.j2 dest: "{{ services.mastodon.volume_folder }}/env_file" - name: Upload vhost config for root domain diff --git a/roles/docker/tasks/services/matrix_element.yml b/roles/docker/tasks/services/matrix_element.yml index f65aa2dc..b5a04b0d 100644 --- a/roles/docker/tasks/services/matrix_element.yml +++ b/roles/docker/tasks/services/matrix_element.yml @@ -29,7 +29,7 @@ - name: Upload Element config.json template: - src: element.config.json.j2 + src: element/config.json.j2 dest: "{{ services.element.volume_folder }}/data/config.json" - name: Upload Element riot.im.conf @@ -50,7 +50,7 @@ - name: Upload homeserver.yaml template: - src: matrix.homeserver.yaml.j2 + src: matrix/homeserver.yaml.j2 dest: "{{ services.matrix.volume_folder }}/data/homeserver.yaml" - name: upload matrix logging config diff --git a/roles/docker/tasks/services/rallly.yml b/roles/docker/tasks/services/rallly.yml index 1d3b481c..400073f9 100644 --- a/roles/docker/tasks/services/rallly.yml +++ b/roles/docker/tasks/services/rallly.yml @@ -7,7 +7,7 @@ - name: Copy Rallly environment file template: - src: rallly.env.j2 + src: rallly/env.j2 dest: "{{ services.rallly.volume_folder }}/env_file" - name: Set up Rallly diff --git a/roles/docker/tasks/services/restic_backup.yml b/roles/docker/tasks/services/restic_backup.yml index 8fce1b59..df0c278d 100644 --- a/roles/docker/tasks/services/restic_backup.yml +++ b/roles/docker/tasks/services/restic_backup.yml @@ -33,7 +33,7 @@ - name: Create SSH config template: - src: restic.ssh.config.j2 + src: restic/ssh.config.j2 dest: "{{ services.restic.volume_folder }}/ssh/config" owner: root group: root @@ -41,7 +41,7 @@ - name: Create SSH known_hosts file template: - src: restic.ssh.known_hosts.j2 + src: restic/ssh.known_hosts.j2 dest: "{{ services.restic.volume_folder }}/ssh/known_hosts" owner: root group: root diff --git a/roles/docker/templates/byro.env.j2 b/roles/docker/templates/byro/env.j2 similarity index 100% rename from roles/docker/templates/byro.env.j2 rename to roles/docker/templates/byro/env.j2 diff --git a/roles/docker/templates/element.config.json.j2 b/roles/docker/templates/element/config.json.j2 similarity index 100% rename from roles/docker/templates/element.config.json.j2 rename to roles/docker/templates/element/config.json.j2 diff --git a/roles/docker/templates/mailu.env.j2 b/roles/docker/templates/mailu/env.j2 similarity index 100% rename from roles/docker/templates/mailu.env.j2 rename to roles/docker/templates/mailu/env.j2 diff --git a/roles/docker/templates/mastodon.env.j2 b/roles/docker/templates/mastodon/env.j2 similarity index 100% rename from roles/docker/templates/mastodon.env.j2 rename to roles/docker/templates/mastodon/env.j2 diff --git a/roles/docker/templates/matrix.homeserver.yaml.j2 b/roles/docker/templates/matrix/homeserver.yaml.j2 similarity index 100% rename from roles/docker/templates/matrix.homeserver.yaml.j2 rename to roles/docker/templates/matrix/homeserver.yaml.j2 diff --git a/roles/docker/templates/rallly.env.j2 b/roles/docker/templates/rallly/env.j2 similarity index 100% rename from roles/docker/templates/rallly.env.j2 rename to roles/docker/templates/rallly/env.j2 diff --git a/roles/docker/templates/restic.ssh.config.j2 b/roles/docker/templates/restic/ssh.config.j2 similarity index 100% rename from roles/docker/templates/restic.ssh.config.j2 rename to roles/docker/templates/restic/ssh.config.j2 diff --git a/roles/docker/templates/restic.ssh.known_hosts.j2 b/roles/docker/templates/restic/ssh.known_hosts.j2 similarity index 100% rename from roles/docker/templates/restic.ssh.known_hosts.j2 rename to roles/docker/templates/restic/ssh.known_hosts.j2