diff options
author | Elizabeth Hunt <me@liz.coffee> | 2025-04-27 22:06:46 -0700 |
---|---|---|
committer | Elizabeth Hunt <me@liz.coffee> | 2025-04-27 22:06:46 -0700 |
commit | c7c2393bc06c0e49612e9d05e55c30028c02cd4a (patch) | |
tree | 082819cda63bcb71d3df5cc6ab921e50c21d83c0 | |
parent | daef0cf448af17357b552245f39067a9d340ce3d (diff) | |
download | infra-c7c2393bc06c0e49612e9d05e55c30028c02cd4a.tar.gz infra-c7c2393bc06c0e49612e9d05e55c30028c02cd4a.zip |
Fix when deployment dir doesn't yet exist on remote
-rwxr-xr-x | create.py | 4 | ||||
-rw-r--r-- | group_vars/all.yml | 4 | ||||
-rw-r--r-- | secrets.txt | 1 | ||||
-rw-r--r-- | tasks/copy-rendered-templates-recursive.yml | 5 |
4 files changed, 12 insertions, 2 deletions
@@ -134,7 +134,7 @@ class RoleGenerator: vars: service_name: {self.service} template_render_dir: "../templates" - service_destination_dir: "{{ {self.service}_base }}" + service_destination_dir: "{{{{ {self.service}_base }}}}" """)) def create_compose_template(self): @@ -148,7 +148,7 @@ class RoleGenerator: - {{{{ {self.service}_base }}}}/volumes/data:/data environment: - TZ={{{{ timezone }}}} - - DEPLOYMENET_TIME={{{{ now() }}}} + - DEPLOYMENT_TIME={{{{ now() }}}} networks: - proxy healthcheck: diff --git a/group_vars/all.yml b/group_vars/all.yml index cef1f9b..eef20a2 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -21,5 +21,9 @@ domain: "liz.coffee" idm_domain: "idm.{{ domain }}" headscale_host: "vpn.{{ domain }}" +mail_domain: "mail.{{ domain }}" +info_mail_user: "info" +info_mail: "{{ info_mail_user }}@{{ domain }}" + traextor_base: "{{ swarm_base }}/traextor" letsencrypt_certs: "{{ traextor_base }}/volumes/certs/letsencrypt" diff --git a/secrets.txt b/secrets.txt index 1a2a469..ee74416 100644 --- a/secrets.txt +++ b/secrets.txt @@ -14,3 +14,4 @@ ses_smtp_user_name ses_smtp_password email_ldap_api_token roundcube_oauth2_client_basic_secret +info_mail_password diff --git a/tasks/copy-rendered-templates-recursive.yml b/tasks/copy-rendered-templates-recursive.yml index e47c39c..0733493 100644 --- a/tasks/copy-rendered-templates-recursive.yml +++ b/tasks/copy-rendered-templates-recursive.yml @@ -41,6 +41,11 @@ path: "{{ tempdir.path }}" state: absent +- name: Ensure destination exists + ansible.builtin.file: + path: "{{ destination_dir }}" + state: directory + - name: Update remote files ansible.builtin.command: cmd: bash -c 'cp -r {{ tempdir.path }}/* {{ destination_dir }}/' |