2023-09-26 11:40:59 +02:00
|
|
|
---
|
|
|
|
# tasks file for is-registry
|
2023-10-03 16:32:13 +02:00
|
|
|
- name: Create the directory where the compose file will be installed
|
|
|
|
ansible.builtin.file:
|
2023-10-12 13:15:15 +02:00
|
|
|
dest: '{{ is_collector_compose_dir }}'
|
2023-10-03 16:32:13 +02:00
|
|
|
state: directory
|
|
|
|
mode: 0750
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
|
|
|
|
- name: Install the docker compose file
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: docker-compose.yml.j2
|
2023-10-27 18:08:27 +02:00
|
|
|
dest: '{{ is_collector_compose_dir }}/{{ service_prefix }}-docker-compose.yml'
|
2023-10-03 16:32:13 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0400
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install the GHNConfig.xml
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: GHNConfig.xml.j2
|
2023-10-12 13:15:15 +02:00
|
|
|
dest: "{{ is_collector_compose_dir }}/GHNConfig.xml"
|
2023-10-03 16:32:13 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0400
|
|
|
|
|
|
|
|
- name: Install the jndi-config.xml
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: jndi-config.xml.j2
|
2023-10-12 13:15:15 +02:00
|
|
|
dest: "{{ is_collector_compose_dir }}/jndi-config.xml"
|
2023-10-03 16:32:13 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0400
|
|
|
|
|
|
|
|
- name: Install the server-config.wsdd
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: server-config.wsdd.j2
|
2023-10-12 13:15:15 +02:00
|
|
|
dest: "{{ is_collector_compose_dir }}/server-config.wsdd"
|
2023-10-03 16:32:13 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0400
|
|
|
|
|
|
|
|
- name: Create the secret for GHNConfig.xml
|
|
|
|
community.docker.docker_secret:
|
2023-10-27 18:08:27 +02:00
|
|
|
name: "{{ service_prefix }}-ghn-config-{{ scope_name }}"
|
2023-10-12 13:15:15 +02:00
|
|
|
data_src: '{{ is_collector_compose_dir }}/GHNConfig.xml'
|
2023-10-03 16:32:13 +02:00
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Create the secret for jndi-config.xml
|
|
|
|
community.docker.docker_secret:
|
2023-10-27 18:08:27 +02:00
|
|
|
name: "{{ service_prefix }}-jndi-config-{{ scope_name }}"
|
2023-10-12 13:15:15 +02:00
|
|
|
data_src: '{{ is_collector_compose_dir }}/jndi-config.xml'
|
2023-10-03 16:32:13 +02:00
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Create the secret for server-config.wsdd
|
|
|
|
community.docker.docker_secret:
|
2023-10-27 18:08:27 +02:00
|
|
|
name: "{{ service_prefix }}-server-config-{{ scope_name }}"
|
2023-10-12 13:15:15 +02:00
|
|
|
data_src: '{{ is_collector_compose_dir }}/server-config.wsdd'
|
2023-10-03 16:32:13 +02:00
|
|
|
state: present
|
|
|
|
|
2023-11-02 13:55:50 +01:00
|
|
|
- name: Install the devel gcube keys
|
|
|
|
get_url: url={{ item.url }} dest={{ is_collector_compose_dir }}/{{ item.name }} owner=root group=root mode=0600
|
|
|
|
with_items: '{{ gcube_dev_security_keys }}'
|
|
|
|
|
|
|
|
- name: Create the the devel gcube keys
|
|
|
|
community.docker.docker_secret:
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
data_src: '{{ is_collector_compose_dir }}/{{ item.name }}'
|
|
|
|
state: present
|
|
|
|
with_items: '{{ gcube_dev_security_keys }}'
|
|
|
|
|
|
|
|
- name: Install the devel legacy gcube key
|
|
|
|
get_url: url={{ item.url }} dest={{ is_collector_compose_dir }}/{{ item.name }} owner=root group=root mode=0600
|
|
|
|
with_items: '{{ gcube_dev_security_key_legacy }}'
|
|
|
|
|
|
|
|
- name: Create the the devel legacy gcube keys
|
|
|
|
community.docker.docker_secret:
|
|
|
|
name: gcube-dev-legacy-security-key
|
|
|
|
data_src: '{{ is_collector_compose_dir }}/{{ item.name }}'
|
|
|
|
state: present
|
|
|
|
with_items: '{{ gcube_dev_security_key_legacy }}'
|
|
|
|
|
2023-10-03 16:32:13 +02:00
|
|
|
- name: Start the project stack on Docker Swarm
|
|
|
|
community.docker.docker_stack:
|
2023-10-12 13:15:15 +02:00
|
|
|
name: '{{ is_collector_docker_stack_name }}'
|
2023-10-03 16:32:13 +02:00
|
|
|
state: present
|
|
|
|
compose:
|
2023-10-27 18:08:27 +02:00
|
|
|
- '{{ is_collector_compose_dir }}/{{ service_prefix }}-docker-compose.yml'
|