---
- name: "π Include Seed routines for '{{ application_id }}' database backup"
include_tasks: "{{ lookup('path_absolute', 'roles/svc-bkp-volume-2-local/tasks/03_seed-database-to-backup.yml') }}"
vars:
database_consumer_id: "{{ application_id }}"
database_type: "postgres"
database_instance: "{{ entity_name }}"
database_host: "127.0.0.1"
database_port: "5432"
database_username: "postgres"
database_password: "{{ lookup('config', application_id, 'secrets.credentials.postgresql_secret') }}"
database_name: "" # Multiple databases
when: "'svc-bkp-volume-2-local' in group_names"
- name: π§ configure websocket_upgrade.conf
copy:
src: "websocket_upgrade.conf"
dest: "{{ [ lookup('nginx','directories.configuration.maps'), 'websocket_upgrade.conf' ] | path_join }}"
notify: restart-openresty
- name: "π§ Set BBB Facts"
set_fact:
BBB_ENV_FILE_LINK: "{{ [compose_repository_path, '.env'] | path_join }}"
BBB_ENV_FILE_ORIGINE: "{{ lookup('container', application_id, 'files.env') }}"
BBB_COMPOSE_FILE_ORIGINE: "{{ [compose_repository_path, 'docker-compose.yml'] | path_join }}"
BBB_COMPOSE_FILE_FINAL: "{{ [lookup('container', application_id, 'directories.instance'), 'compose.yml'] | path_join }}"
- name: "π¨ Render the meeting client settings of '{{ application_id }}'"
stack_host_template:
src: bbb-html5.yml.j2
dest: "{{ BBB_HTML5_SETTINGS_HOST }}"
mode: "0444"
notify: compose-up
- name: π Create symbolic link from .env file to target location
file:
src: "{{ BBB_ENV_FILE_ORIGINE }}"
dest: "{{ BBB_ENV_FILE_LINK }}"
state: link
- name: "π§ Setup compose.yml file"
include_tasks: "../01_compose.yml"
- name: πΏ flush docker service
meta: flush_handlers
- name: "β
Ensure PostgreSQL password matches POSTGRESQL_SECRET"
ansible.builtin.include_tasks: "../01_compose/postgres_password_sync.yml"
- name: "π§ Setup administrator"
include_tasks: "../02_administrator.yml"
- name: "π¨ Setup corporate design"
include_tasks: "../03_design.yml"
- name: "π§ Pin search_path on immutable_lower_unaccent in every database"
ansible.builtin.shell: # nocheck: compose_mode_force role
cmd: >-
container exec -i {{ BBB_POSTGRES_CONTAINER_ADDRESS }}
sh -c 'cat > /tmp/pin_search_path.sql
&& for db in $(psql -U postgres -d postgres -v ON_ERROR_STOP=1 -tAf /tmp/pin_search_path.sql);
do psql -U postgres -d "$db" -v ON_ERROR_STOP=1 -f /tmp/pin_search_path.sql; done'
stdin: "{{ lookup('file', role_path ~ '/files/sql/pin_immutable_lower_unaccent_search_path.sql') }}"
register: bbb_pg_search_path
retries: 20
delay: 3
until: bbb_pg_search_path.rc == 0
changed_when: false