48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
---
|
|
- name: Manage the PEP configuration
|
|
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
|
tags: ['sobigdata_manila', 'sobigdata_manila_pep']
|
|
run_once: true
|
|
block:
|
|
- name: Get the templates from the external repository
|
|
become: false
|
|
ansible.builtin.get_url:
|
|
url: "{{ nginx_pep_base_url }}/{{ sobigdata_manila_pep_template }}.j2"
|
|
dest: "/tmp/{{ sobigdata_manila_pep_template }}.j2"
|
|
mode: 0400
|
|
loop: nginx_pep_templates
|
|
loop_control:
|
|
loop_var: sobigdata_manila_pep_template
|
|
delegate_to: localhost
|
|
|
|
- name: Generate the PEP configurations
|
|
ansible.builtin.template:
|
|
src: "/tmp/{{ sobigdata_manila_pep_conf }}.j2"
|
|
dest: "{{ sobigdata_manila_compose_dir }}/{{ sobigdata_manila_pep_conf }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0444
|
|
loop: nginx_pep_templates
|
|
loop_control:
|
|
loop_var: sobigdata_manila_pep_conf
|
|
|
|
- name: Generate pep-docker-swarm
|
|
ansible.builtin.template:
|
|
src: templates/pep-swarm.yml.j2
|
|
dest: "{{ sobigdata_manila_compose_dir }}/pep-stack.yml"
|
|
owner: root
|
|
group: root
|
|
mode: 0444
|
|
|
|
- name: Run the PEP stack
|
|
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
|
tags: ['sobigdata_manila', 'sobigdata_manila_pep']
|
|
run_once: true
|
|
block:
|
|
- name: Start the Sobigdata REL project PEP stack
|
|
community.docker.docker_stack:
|
|
name: '{{ sobigdata_manila_docker_stack_name }}'
|
|
state: present
|
|
compose:
|
|
- '{{ sobigdata_manila_compose_dir }}/pep-stack.yml'
|