Consolidate vars files

This commit is contained in:
Sam A. 2024-02-04 16:34:29 +01:00
parent f51540b4a1
commit 0b6f045648
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
6 changed files with 20 additions and 21 deletions

View file

@ -1,10 +0,0 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
apps_base_domain: sapti.me
db_inventory_hostname: sapt-labp-db01
db_host: "{{ hostvars[db_inventory_hostname].internal_ipv4 }}"
proxy_inventory_hostname: sapt-labr-prx01
proxy_host: "{{ hostvars[proxy_inventory_hostname].internal_ipv4 }}"

View file

@ -1,10 +0,0 @@
# 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].internal_ipv4 }}"
proxy_inventory_hostname: sapt-labr-prx01
proxy_host: "{{ hostvars[proxy_inventory_hostname].internal_ipv4 }}"

View file

@ -1,6 +1,7 @@
# vim: ft=yaml.ansible # vim: ft=yaml.ansible
# code: language=ansible # code: language=ansible
--- ---
apps_base_domain: sapti.me
internal_subnet: 10.2.16.0/24 internal_subnet: 10.2.16.0/24
postgresql_version: 14 postgresql_version: 14
@ -8,3 +9,9 @@ databases:
nextcloud: nextcloud:
username: nextcloud username: nextcloud
password: "{{ vault_db_passwords.nextcloud }}" password: "{{ vault_db_passwords.nextcloud }}"
db_inventory_hostname: sapt-labp-db01
db_host: "{{ hostvars[db_inventory_hostname].internal_ipv4 }}"
proxy_inventory_hostname: sapt-labr-prx01
proxy_host: "{{ hostvars[proxy_inventory_hostname].internal_ipv4 }}"

View file

@ -0,0 +1,4 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
apps_base_domain: sapti.me

View file

@ -1,6 +1,7 @@
# vim: ft=yaml.ansible # vim: ft=yaml.ansible
# code: language=ansible # code: language=ansible
--- ---
apps_base_domain: staging.sapti.me
internal_subnet: 10.2.19.0/24 internal_subnet: 10.2.19.0/24
postgresql_version: 14 postgresql_version: 14
@ -8,3 +9,9 @@ databases:
nextcloud: nextcloud:
username: nextcloud username: nextcloud
password: "{{ vault_db_passwords.nextcloud }}" password: "{{ vault_db_passwords.nextcloud }}"
db_inventory_hostname: sapt-labs-db01
db_host: "{{ hostvars[db_inventory_hostname].internal_ipv4 }}"
proxy_inventory_hostname: sapt-labr-prx01
proxy_host: "{{ hostvars[proxy_inventory_hostname].internal_ipv4 }}"

View file

@ -21,7 +21,8 @@
- name: Include role 'apps' - name: Include role 'apps'
ansible.builtin.include_role: ansible.builtin.include_role:
name: apps name: apps
when: hostname in groups['appservers'] when: hostname in groups['appservers'] or
hostname in groups['publicservers']
- name: Include role 'postgresql' - name: Include role 'postgresql'
ansible.builtin.include_role: ansible.builtin.include_role: