40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
---
|
|
- name: Manage the PEP configuration
|
|
block:
|
|
- name: Generate PEP config
|
|
ansible.builtin.template:
|
|
src: templates/nginx.conf.j2
|
|
dest: "{{ sobigdata_rel_compose_dir }}/nginx.conf"
|
|
|
|
- name: Generate PEP default config
|
|
ansible.builtin.template:
|
|
src: templates/nginx.default.conf.j2
|
|
dest: "{{ sobigdata_rel_compose_dir }}/nginx.default.conf"
|
|
|
|
- name: Generate pep.js
|
|
ansible.builtin.template:
|
|
src: templates/pep.js.j2
|
|
dest: "{{ sobigdata_rel_compose_dir }}/pep.js"
|
|
|
|
- name: Generate pep-docker-swarm
|
|
ansible.builtin.template:
|
|
src: templates/pep-swarm.yml.j2
|
|
dest: "{{ sobigdata_rel_compose_dir }}/rel-pep-stack.yml"
|
|
|
|
run_once: True
|
|
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
|
tags: [ 'sobigdata_rel', 'sobigdata_rel_pep' ]
|
|
|
|
- name: Run the PEP stack
|
|
block:
|
|
- name: Start the Sobigdata REL project PEP stack
|
|
ansible.builtin.docker_stack:
|
|
name: '{{ sobigdata_rel_docker_stack_name }}'
|
|
state: present
|
|
compose:
|
|
- '{{ sobigdata_rel_compose_dir }}/rel-pep-stack.yml'
|
|
|
|
run_once: True
|
|
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
|
tags: [ 'sobigdata_rel', 'sobigdata_rel_pep' ]
|