ansible-playbook-sobigdata-.../roles/ontotagme/tasks/pep.yml

48 lines
1.6 KiB
YAML

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