|
| 1 | +- name: Retrieve vars from environments inventory |
| 2 | + ansible.builtin.include_vars: |
| 3 | + dir: "{{ inventory_dir }}/../{{ env }}/group_vars/" |
| 4 | + |
| 5 | +- name: Retrieve secrets from environments inventory |
| 6 | + ansible.builtin.include_vars: |
| 7 | + file: "{{ inventory_dir }}/../{{ env }}/secrets/secrets.yml" |
| 8 | + |
| 9 | +- name: Create mujina idp container |
| 10 | + ansible.builtin.include_role: |
| 11 | + name: mujina-idp |
| 12 | + vars: |
| 13 | + mujina_idp_container: "mujina-idp-{{ env }}" |
| 14 | + mujina_idp_dir_docker: "/opt/openconext/mujina_idp_{{ env }}" |
| 15 | + |
| 16 | +- name: Create mujina sp container |
| 17 | + ansible.builtin.include_role: |
| 18 | + name: mujina-sp |
| 19 | + vars: |
| 20 | + mujina_sp_container: "mujina-sp-{{ env }}" |
| 21 | + mujina_sp_dir_docker: "/opt/openconext/mujina_sp_{{ env }}" |
| 22 | + |
| 23 | +- name: Place health scripts |
| 24 | + ansible.builtin.template: |
| 25 | + src: templates/check.sh.j2 |
| 26 | + dest: "/opt/openconext/health_check_{{ env }}/check.sh" |
| 27 | + mode: 0755 |
| 28 | + |
| 29 | +- name: Place application.yml for set environments |
| 30 | + ansible.builtin.template: |
| 31 | + src: templates/application.yml.j2 |
| 32 | + dest: "/opt/openconext/health_check_{{ env }}/application.yml" |
| 33 | + mode: 0644 |
| 34 | + |
| 35 | +- name: Start monitoring tests docker container(s) |
| 36 | + community.docker.docker_container: |
| 37 | + name: "monitoring-{{ env }}" |
| 38 | + image: "ghcr.io/openconext/openconext-monitoring/monitoring:latest" |
| 39 | + state: started |
| 40 | + restart_policy: "always" |
| 41 | + recreate: false |
| 42 | + ports: |
| 43 | + - "{{ monitoring_tests.port }}:{{ monitoring_tests.port }}" |
| 44 | + mounts: |
| 45 | + - type: bind |
| 46 | + source: "/opt/openconext/health_check_{{ env }}/application.yml" |
| 47 | + target: /application.yml |
0 commit comments