|
|
|
@ -1,45 +1,37 @@
|
|
|
|
|
---
|
|
|
|
|
- name: Manage the installation of the uFish configuration of the swarm service
|
|
|
|
|
run_once: true
|
|
|
|
|
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
|
|
|
|
tags: ['bc_ufish', 'bc_ufish_swarm']
|
|
|
|
|
block:
|
|
|
|
|
- name: Add the label that will be used as a constraint for the uFish DB
|
|
|
|
|
docker_node:
|
|
|
|
|
hostname: '{{ bc_ufish_db_docker_host }}'
|
|
|
|
|
labels:
|
|
|
|
|
ufish_db_data: 'bc_ufish'
|
|
|
|
|
labels_state: 'merge'
|
|
|
|
|
|
|
|
|
|
- name: Create the directory where the compose will be stored
|
|
|
|
|
file:
|
|
|
|
|
ansible.builtin.file:
|
|
|
|
|
dest: '{{ bc_ufish_compose_dir }}'
|
|
|
|
|
state: directory
|
|
|
|
|
owner: root
|
|
|
|
|
group: root
|
|
|
|
|
mode: '0755'
|
|
|
|
|
mode: 0755
|
|
|
|
|
|
|
|
|
|
- name: Install the docker compose file of the ufish stack
|
|
|
|
|
template:
|
|
|
|
|
ansible.builtin.template:
|
|
|
|
|
src: bluecloud-ufish-docker-compose.yml.j2
|
|
|
|
|
dest: '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack.yml'
|
|
|
|
|
owner: root
|
|
|
|
|
group: root
|
|
|
|
|
mode: '0400'
|
|
|
|
|
mode: 0400
|
|
|
|
|
|
|
|
|
|
- name: Install the docker compose file for the ufish db server and for phpmyadmin
|
|
|
|
|
template:
|
|
|
|
|
ansible.builtin.template:
|
|
|
|
|
src: bluecloud-ufish-db-docker-compose.yml.j2
|
|
|
|
|
dest: '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack-db.yml'
|
|
|
|
|
owner: root
|
|
|
|
|
group: root
|
|
|
|
|
mode: '0400'
|
|
|
|
|
mode: 0400
|
|
|
|
|
|
|
|
|
|
- name: Start the uFish stack
|
|
|
|
|
docker_stack:
|
|
|
|
|
community.docker.docker_stack:
|
|
|
|
|
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'
|
|
|
|
|
|
|
|
|
|
run_once: True
|
|
|
|
|
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
|
|
|
|
tags: [ 'bc_ufish', 'bc_ufish_swarm' ]
|
|
|
|
|