2023-12-08 00:34:48 +01:00
|
|
|
---
|
2024-02-06 21:58:13 +01:00
|
|
|
- name: "stop and remove discourse container if it exist"
|
|
|
|
docker_container:
|
2025-02-13 14:11:06 +01:00
|
|
|
name: "{{applications.discourse.container}}"
|
2024-02-06 21:58:13 +01:00
|
|
|
state: absent
|
|
|
|
register: container_action
|
|
|
|
failed_when: container_action.failed and 'No such container' not in container_action.msg
|
|
|
|
listen: recreate discourse
|
2024-02-06 23:14:56 +01:00
|
|
|
|
2025-01-30 15:04:23 +01:00
|
|
|
- name: "add central database temporary to {{application_id}}_default"
|
2024-02-06 23:14:56 +01:00
|
|
|
command:
|
2025-02-14 09:37:22 +01:00
|
|
|
cmd: "docker network connect {{applications.discourse.network}} central-{{ database_type }}"
|
2024-02-06 23:14:56 +01:00
|
|
|
ignore_errors: true
|
|
|
|
when: enable_central_database | bool
|
|
|
|
listen: recreate discourse
|
|
|
|
|
2024-02-06 21:58:13 +01:00
|
|
|
- name: rebuild discourse
|
2023-12-08 00:34:48 +01:00
|
|
|
command:
|
2025-02-13 14:11:06 +01:00
|
|
|
cmd: "./launcher rebuild {{applications.discourse.container}}"
|
2025-02-19 16:26:32 +01:00
|
|
|
chdir: "{{docker_repository_directory }}"
|
2024-02-06 21:58:13 +01:00
|
|
|
listen: recreate discourse
|