inventory, roles, config, docs: update all files to refactor the ansible variables structure
This commit is contained in:
@@ -50,15 +50,15 @@
|
||||
group: "svadmins"
|
||||
mode: "{{ item.mode }}"
|
||||
loop:
|
||||
- name: "ilnmors_root_ca.crt"
|
||||
- name: "{{ root_cert_filename }}"
|
||||
value: "{{ hostvars['console']['ca']['root']['crt'] }}"
|
||||
path: "{{ node['home_path'] }}/containers/ca/certs"
|
||||
mode: "0440"
|
||||
- name: "ilnmors_intermediate_ca.crt"
|
||||
- name: "{{ intermediate_cert_filename }}"
|
||||
value: "{{ hostvars['console']['ca']['intermediate']['crt'] }}"
|
||||
path: "{{ node['home_path'] }}/containers/ca/certs"
|
||||
mode: "0440"
|
||||
- name: "ilnmors_intermediate_ca.key"
|
||||
- name: "{{ intermediate_key_filename }}"
|
||||
value: "{{ hostvars['console']['ca']['intermediate']['key'] }}"
|
||||
path: "{{ node['home_path'] }}/containers/ca/secrets"
|
||||
mode: "0400"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
ansible.builtin.copy:
|
||||
content: |
|
||||
{{ hostvars['console']['ca']['root']['crt'] }}
|
||||
dest: "{{ node['home_path'] }}/containers/grafana/ssl/ilnmors_root_ca.crt"
|
||||
dest: "{{ node['home_path'] }}/containers/grafana/ssl/{{ root_cert_filename }}"
|
||||
owner: "{{ grafana_subuid }}"
|
||||
group: "svadmins"
|
||||
mode: "0400"
|
||||
@@ -61,10 +61,10 @@
|
||||
notify: "notification_restart_grafana"
|
||||
no_log: true
|
||||
|
||||
- name: Deploy provisioing and dashboard files
|
||||
ansible.builtin.copy:
|
||||
src: "{{ hostvars['console']['node']['config_path'] }}/services/containers/infra/grafana/etc/provisioning/"
|
||||
dest: "{{ node['home_path'] }}/containers/grafana/etc/provisioning/"
|
||||
- name: Deploy provisioing file
|
||||
ansible.builtin.template:
|
||||
src: "{{ hostvars['console']['node']['config_path'] }}/services/containers/infra/grafana/etc/provisioning/datasources/datasources.yaml.j2"
|
||||
dest: "{{ node['home_path'] }}/containers/grafana/etc/provisioning/datasources/datasources.yaml"
|
||||
owner: "{{ grafana_subuid }}"
|
||||
group: "svadmins"
|
||||
mode: "0400"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
group: "svadmins"
|
||||
mode: "{{ item.mode }}"
|
||||
loop:
|
||||
- name: "ilnmors_root_ca.crt"
|
||||
- name: "{{ root_cert_filename }}"
|
||||
value: "{{ hostvars['console']['ca']['root']['crt'] }}"
|
||||
mode: "0440"
|
||||
- name: "ldap.crt"
|
||||
@@ -50,7 +50,7 @@
|
||||
# urlencode doesn't fix `/` as `%2F`. It needs replace
|
||||
- name: "LLDAP_DATABASE_URL"
|
||||
value: "postgres://ldap:{{ hostvars['console']['postgresql']['password']['ldap'] | urlencode | replace('/', '%2F') }}\
|
||||
@{{ infra_uri['postgresql']['domain'] }}/ldap_db?sslmode=verify-full&sslrootcert=/etc/ssl/ldap/ilnmors_root_ca.crt"
|
||||
@{{ services['postgresql']['domain'] }}.{{ domain['internal'] }}/ldap_db?sslmode=verify-full&sslrootcert=/etc/ssl/ldap/{{ root_cert_filename }}"
|
||||
- name: "LLDAP_KEY_SEED"
|
||||
value: "{{ hostvars['console']['ldap']['seed_key'] }}"
|
||||
- name: "LLDAP_JWT_SECRET"
|
||||
@@ -78,7 +78,7 @@
|
||||
detach: false
|
||||
env:
|
||||
TZ: "Asia/Seoul"
|
||||
LLDAP_LDAP_BASE_DN: "dc=ilnmors,dc=internal"
|
||||
LLDAP_LDAP_BASE_DN: "{{ domain['dc'] }}"
|
||||
secrets:
|
||||
- "LLDAP_DATABASE_URL,type=env"
|
||||
- "LLDAP_KEY_SEED,type=env"
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
become: true
|
||||
|
||||
- name: Deploy loki configuration file
|
||||
ansible.builtin.copy:
|
||||
src: "{{ hostvars['console']['node']['config_path'] }}/services/containers/infra/loki/etc/loki.yaml"
|
||||
ansible.builtin.template:
|
||||
src: "{{ hostvars['console']['node']['config_path'] }}/services/containers/infra/loki/etc/loki.yaml.j2"
|
||||
dest: "{{ node['home_path'] }}/containers/loki/etc/loki.yaml"
|
||||
owner: "{{ loki_subuid }}"
|
||||
group: "svadmins"
|
||||
@@ -37,7 +37,7 @@
|
||||
group: "svadmins"
|
||||
mode: "{{ item.mode }}"
|
||||
loop:
|
||||
- name: "ilnmors_root_ca.crt"
|
||||
- name: "{{ root_cert_filename }}"
|
||||
value: "{{ hostvars['console']['ca']['root']['crt'] }}"
|
||||
mode: "0440"
|
||||
- name: "loki.crt"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
- name: Build postgresql container image
|
||||
containers.podman.podman_image:
|
||||
name: "ilnmors.internal/{{ node['name'] }}/postgres"
|
||||
name: "{{ domain['internal'] }}/{{ node['name'] }}/postgres"
|
||||
# check tags from container file
|
||||
tag: "pg{{ version['containers']['postgresql'] }}-vectorchord{{ version['containers']['vectorchord'] }}"
|
||||
state: "build"
|
||||
@@ -75,7 +75,7 @@
|
||||
group: "svadmins"
|
||||
mode: "{{ item.mode }}"
|
||||
loop:
|
||||
- name: "ilnmors_root_ca.crt"
|
||||
- name: "{{ root_cert_filename }}"
|
||||
value: "{{ hostvars['console']['ca']['root']['crt'] }}"
|
||||
mode: "0440"
|
||||
- name: "postgresql.crt"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
group: "svadmins"
|
||||
mode: "{{ item.mode }}"
|
||||
loop:
|
||||
- name: "ilnmors_root_ca.crt"
|
||||
- name: "{{ root_cert_filename }}"
|
||||
value: "{{ hostvars['console']['ca']['root']['crt'] }}"
|
||||
mode: "0440"
|
||||
- name: "prometheus.crt"
|
||||
|
||||
Reference in New Issue
Block a user