ansible-role-bluecloud-ufish/tasks/main.yml

38 lines
1.3 KiB
YAML
Raw Normal View History

2021-05-19 18:31:41 +02:00
---
2021-05-21 12:06:00 +02:00
- name: Manage the installation of the uFish configuration of the swarm service
2023-05-22 20:29:21 +02:00
run_once: true
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
tags: ['bc_ufish', 'bc_ufish_swarm']
2021-05-21 12:06:00 +02:00
block:
- name: Create the directory where the compose will be stored
2023-05-22 20:29:21 +02:00
ansible.builtin.file:
2021-05-21 12:06:00 +02:00
dest: '{{ bc_ufish_compose_dir }}'
state: directory
owner: root
group: root
2023-05-22 20:29:21 +02:00
mode: 0755
2021-05-21 12:06:00 +02:00
- name: Install the docker compose file of the ufish stack
2023-05-22 20:29:21 +02:00
ansible.builtin.template:
2021-05-21 12:06:00 +02:00
src: bluecloud-ufish-docker-compose.yml.j2
dest: '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack.yml'
owner: root
group: root
2023-05-22 20:29:21 +02:00
mode: 0400
2021-05-21 12:06:00 +02:00
- name: Install the docker compose file for the ufish db server and for phpmyadmin
2023-05-22 20:29:21 +02:00
ansible.builtin.template:
2021-05-21 12:06:00 +02:00
src: bluecloud-ufish-db-docker-compose.yml.j2
dest: '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack-db.yml'
owner: root
group: root
2023-05-22 20:29:21 +02:00
mode: 0400
2021-05-21 12:06:00 +02:00
- name: Start the uFish stack
2023-05-22 20:29:21 +02:00
community.docker.docker_stack:
2021-05-21 12:06:00 +02:00
name: bluecloud-ufish
state: present
compose:
- '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack-db.yml'
- '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack.yml'