2023-12-08 00:34:48 +01:00
|
|
|
---
|
2024-01-05 11:13:51 +01:00
|
|
|
|
|
|
|
# Necessary for building: https://chat.openai.com/share/99d258cc-294b-4924-8eef-02fe419bb838
|
|
|
|
- name: install which
|
|
|
|
pacman:
|
|
|
|
name: which
|
|
|
|
state: present
|
|
|
|
|
2024-01-03 20:17:55 +01:00
|
|
|
- name: "include docker-compose-common.yml"
|
|
|
|
include_tasks: docker-compose-common.yml
|
2024-01-02 21:13:34 +01:00
|
|
|
|
2023-12-08 00:34:48 +01:00
|
|
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
|
|
|
include_tasks: nginx-docker-proxy-domain.yml
|
2023-12-11 12:49:28 +01:00
|
|
|
loop: "{{ domains }}"
|
|
|
|
loop_control:
|
|
|
|
loop_var: domain
|
2023-12-08 00:34:48 +01:00
|
|
|
|
|
|
|
- name: "create {{docker_compose_instance_directory}}"
|
|
|
|
file:
|
|
|
|
path: "{{docker_compose_instance_directory}}"
|
|
|
|
state: directory
|
|
|
|
mode: 0755
|
|
|
|
|
|
|
|
- name: checkout repository
|
|
|
|
ansible.builtin.shell: git checkout .
|
|
|
|
become: true
|
|
|
|
args:
|
|
|
|
chdir: "{{docker_compose_instance_directory}}"
|
2024-01-05 11:08:09 +01:00
|
|
|
ignore_errors: true
|
2023-12-08 00:34:48 +01:00
|
|
|
|
|
|
|
- name: pull docker repository
|
|
|
|
git:
|
|
|
|
repo: "https://github.com/discourse/discourse_docker.git"
|
|
|
|
dest: "{{docker_compose_instance_directory}}"
|
|
|
|
update: yes
|
|
|
|
notify: recreate discourse
|
|
|
|
become: true
|
|
|
|
ignore_errors: true
|
|
|
|
|
2023-12-08 01:01:18 +01:00
|
|
|
- name: set chmod 700 for {{docker_compose_instance_directory}}containers
|
2023-12-08 00:34:48 +01:00
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{docker_compose_instance_directory}}/containers"
|
|
|
|
mode: '700'
|
|
|
|
state: directory
|
|
|
|
|
2023-12-08 16:03:39 +01:00
|
|
|
- name: "copy configuration to {{docker_compose_instance_directory}}containers/app.yml"
|
2023-12-08 00:34:48 +01:00
|
|
|
template:
|
2023-12-08 16:03:39 +01:00
|
|
|
src: app.yml.j2
|
|
|
|
dest: "{{docker_compose_instance_directory}}containers/app.yml"
|
2023-12-08 00:34:48 +01:00
|
|
|
notify: recreate discourse
|