2021-11-02 19:47:36 +01:00
|
|
|
---
|
2023-05-22 18:54:02 +02:00
|
|
|
- name: Manage the compose directory
|
|
|
|
tags: ['inception_project', 'inception_project_swarm', 'inception_project_service']
|
2021-11-02 19:47:36 +01:00
|
|
|
block:
|
2023-05-22 18:54:02 +02:00
|
|
|
- name: Create the directory where the compose file will be installed
|
|
|
|
ansible.builtin.file:
|
|
|
|
dest: "{{ inception_project_compose_dir }}"
|
2023-05-22 19:35:03 +02:00
|
|
|
state: directory
|
2023-05-22 18:54:02 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0700
|
2021-11-02 19:47:36 +01:00
|
|
|
|
2023-05-22 18:54:02 +02:00
|
|
|
- name: Manage the installation of the Inception configuration of the swarm service
|
2022-04-29 13:41:53 +02:00
|
|
|
tags: ['inception_project', 'inception_project_swarm', 'inception_project_service']
|
2023-05-22 18:54:02 +02:00
|
|
|
block:
|
|
|
|
- name: Install the inception properties file
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: settings.properties.j2
|
|
|
|
dest: "{{ inception_project_compose_dir }}/settings.properties"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0400
|
2021-11-02 19:47:36 +01:00
|
|
|
|
|
|
|
- name: Manage the installation of the Inception project Docker stack
|
2023-05-22 18:54:02 +02:00
|
|
|
run_once: true
|
|
|
|
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
|
|
|
tags: ['inception_project', 'inception_project_swarm', 'inception_project_service']
|
2021-11-02 19:47:36 +01:00
|
|
|
block:
|
|
|
|
- name: Install the docker compose file
|
2023-05-22 18:54:02 +02:00
|
|
|
ansible.builtin.template:
|
|
|
|
src: inception-project-docker-compose.yml.j2
|
|
|
|
dest: "{{ inception_project_compose_dir }}/docker-inception-project-stack.yml"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0400
|
|
|
|
|
|
|
|
- name: Create the secret for the application settings
|
|
|
|
community.docker.docker_secret:
|
|
|
|
name: inception_service_config
|
|
|
|
data_src: "{{ inception_project_compose_dir }}/settings.properties"
|
|
|
|
state: present
|
2021-11-02 19:47:36 +01:00
|
|
|
|
2022-04-29 14:08:05 +02:00
|
|
|
- name: Start the Inception project stack
|
2023-05-22 18:54:02 +02:00
|
|
|
community.docker.docker_stack:
|
2021-11-02 19:47:36 +01:00
|
|
|
name: inception-project
|
|
|
|
state: present
|
|
|
|
compose:
|
|
|
|
- '{{ inception_project_compose_dir }}/docker-inception-project-stack.yml'
|