Add docker-compose installation

This commit is contained in:
2023-11-10 14:47:57 +01:00
parent d11bfc25dd
commit 5f94ee8409
4 changed files with 71 additions and 14 deletions

View File

@@ -1,8 +1,37 @@
---
- name: Ensure Static Sits are setup
- name: Ensure static network is created in Docker
community.docker.docker_network:
name: "{{ static_container_network }}"
driver: bridge
- name: Ensure SWS path exists
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
mode: 0700
with_items:
- {path: "{{ static_site_server_base_path }}", when: true}
- name: Ensure docker-compose file is installed
ansible.builtin.template:
src: "{{ role_path }}/templates/docer-compose.yml.j2"
dest: "{{ static_site_server_base_path }}/docker-compose.yml"
mode: 0640
- name: Ensure SWS container image is pulled
community.docker.docker_image:
name: "{{ gotosocial_container_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
- name: Ensure Static Sites are setup
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_site.yml"
with_items: "{{ static_sites }}"
loop_control:
loop_var: site
no_log: true
no_log: true
- name: Ensure SSW is pulled
community.docker.docker_image:
name: "{{ sws_container_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"