diff --git a/group_vars/app_stage/vars.yml b/group_vars/app_stage/vars.yml index def112c..b53f2a8 100644 --- a/group_vars/app_stage/vars.yml +++ b/group_vars/app_stage/vars.yml @@ -1,5 +1,7 @@ # vim: ft=yaml.ansible # code: language=ansible --- +apps_base_domain: staging.sapti.me + db_inventory_hostname: sapt-labs-db01 db_host: "{{ hostvars[db_inventory_hostname].ansible_host }}" diff --git a/group_vars/appservers/vars.yml b/group_vars/appservers/vars.yml index e4fca84..2f2e06a 100644 --- a/group_vars/appservers/vars.yml +++ b/group_vars/appservers/vars.yml @@ -2,9 +2,6 @@ # code: language=ansible --- apps_data_root: "{{ encrypted_fs }}/apps" -apps_base_domain: "{{ base_domain }}" -apps_local_domain: "{{ local_domain }}" - docker_data_root: "{{ encrypted_fs }}/docker" redis_passwords: diff --git a/group_vars/production/vars.yml b/group_vars/production/vars.yml index d771d9b..a969220 100644 --- a/group_vars/production/vars.yml +++ b/group_vars/production/vars.yml @@ -1,8 +1,5 @@ # vim: ft=yaml.ansible # code: language=ansible --- -base_domain: sapti.me -local_domain: local.{{ base_domain }} - db_passwords: nextcloud: "{{ vault_db_passwords.nextcloud }}" diff --git a/group_vars/staging/vars.yml b/group_vars/staging/vars.yml index 7ed21cb..a969220 100644 --- a/group_vars/staging/vars.yml +++ b/group_vars/staging/vars.yml @@ -1,8 +1,5 @@ # vim: ft=yaml.ansible # code: language=ansible --- -base_domain: staging.sapti.me -local_domain: local.{{ base_domain }} - db_passwords: nextcloud: "{{ vault_db_passwords.nextcloud }}" diff --git a/roles/apps/defaults/main.yml b/roles/apps/defaults/main.yml index 58f3f1d..23985a3 100644 --- a/roles/apps/defaults/main.yml +++ b/roles/apps/defaults/main.yml @@ -1,7 +1,7 @@ # vim: ft=yaml.ansible # code: language=ansible --- -apps_base_domain: example.com +apps_base_domain: sapti.me apps_local_domain: local.{{ apps_base_domain }} apps_data_root: /apps apps_shared_docker_network: apps_network @@ -16,6 +16,7 @@ apps_vars: postfix: domain: smtp.{{ apps_base_domain }} backup: true + sender: false extra_tasks: false version: latest-alpine @@ -23,41 +24,44 @@ apps_vars: domain: ipfs.{{ apps_local_domain }} gateway_domain: ipfs-gateway.{{ apps_base_domain }} backup: false + sender: false extra_tasks: true version: v0.23.0 monerod: domain: xmr.{{ apps_base_domain }} backup: false + sender: false extra_tasks: false version: latest nextcloud: domain: cloud.{{ apps_base_domain }} backup: true + sender: true extra_tasks: true version: 27-apache - postgres_version: 14-alpine redis_version: 7-alpine snowflake: backup: false + sender: false extra_tasks: false version: latest restic: backup: false + sender: false extra_tasks: false version: '1.7.0' watchtower: backup: false + sender: false extra_tasks: false version: '1.6.0' apps_include: "{{ apps_vars | dict2items | map(attribute='key') | list }}" apps_backup: "{{ apps_vars | dict2items | selectattr('value.backup', 'true') | map(attribute='key') | list | intersect(apps_include) }}" apps_proxied: "{{ apps_vars | dict2items | selectattr('value.domain', 'defined') | map(attribute='key') | list | intersect(apps_include) }}" - -apps_sender_domains: - - "{{ apps_vars.nextcloud.domain }}" +apps_senders: "{{ apps_vars | dict2items | selectattr('value.sender', 'true') | map(attribute='key') | list | intersect(apps_include) }}" diff --git a/roles/apps/templates/compose-files/postfix.yml.j2 b/roles/apps/templates/compose-files/postfix.yml.j2 index c056c01..f043f1e 100644 --- a/roles/apps/templates/compose-files/postfix.yml.j2 +++ b/roles/apps/templates/compose-files/postfix.yml.j2 @@ -6,7 +6,7 @@ services: image: boky/postfix:{{ apps_vars.postfix.version }} restart: always environment: - ALLOWED_SENDER_DOMAINS: "{{ apps_sender_domains | join(' ') }}" + ALLOWED_SENDER_DOMAINS: "{{ apps_senders | join(' ') }}" HOSTNAME: "{{ apps_vars.postfix.domain }}" DKIM_AUTOGENERATE: "true" networks: