-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathpost.yml
More file actions
77 lines (73 loc) · 3.04 KB
/
post.yml
File metadata and controls
77 lines (73 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
# Configure the Zenith clients that are required
# Note zenith hosts are in podman group
- hosts: grafana
tasks:
- name: Deploy the Zenith client for Grafana
ansible.builtin.include_role:
name: zenith_proxy
vars:
zenith_proxy_service_name: zenith-monitoring
# Use the IP address for the upstream host
zenith_proxy_upstream_host: "{{ ansible_host }}" # IP
zenith_proxy_upstream_port: "{{ grafana_port }}"
zenith_proxy_client_token: "{{ zenith_token_monitoring }}"
zenith_proxy_mitm_enabled: true
zenith_proxy_mitm_auth_inject: basic
zenith_proxy_mitm_auth_basic_username: "{{ grafana_security.admin_user }}"
zenith_proxy_mitm_auth_basic_password: "{{ grafana_security.admin_password }}"
zenith_proxy_state_dir: "{{ appliances_state_dir }}/{{ zenith_proxy_service_name }}-ssh"
when: zenith_subdomain_monitoring is defined
- hosts: openondemand
tasks:
- name: Migrate legacy Zenith OOD state
ansible.builtin.include_role:
name: zenith_proxy
tasks_from: migrate-ood.yml
vars:
zenith_proxy_service_name: zenith-ood
zenith_proxy_state_dir: "{{ caas_ood_zenith_dir }}/{{ zenith_proxy_service_name }}-ssh"
- name: Deploy the Zenith client for OOD
ansible.builtin.include_role:
name: zenith_proxy
vars:
zenith_proxy_service_name: zenith-ood
# Use the IP address for the upstream host
zenith_proxy_upstream_scheme: https
zenith_proxy_upstream_host: "{{ ansible_host }}" # IP
zenith_proxy_upstream_port: 443
zenith_proxy_client_token: "{{ zenith_token_ood }}"
zenith_proxy_mitm_enabled: true
zenith_proxy_mitm_auth_inject: basic
zenith_proxy_mitm_auth_basic_username: azimuth
zenith_proxy_mitm_auth_basic_password: "{{ vault_azimuth_user_password }}"
zenith_proxy_state_dir: "{{ caas_ood_zenith_dir }}/{{ zenith_proxy_service_name }}-ssh"
when: zenith_subdomain_ood is defined
# Run hpctests if set in UI
- hosts: hpctests[0]
become: false
gather_facts: false
tasks:
- ansible.builtin.import_role:
name: hpctests
when: cluster_run_validation | default(false) | bool
# Write the outputs as the final task
- hosts: localhost
tasks:
- ansible.builtin.debug:
var: outputs
vars:
# Ansible has a fit when there are two 'hostvars' evaluations in a resolution chain,
# so we have to repeat logic here unfortunately
outputs: >-
{{-
{ "cluster_access_ip": hostvars[groups['openstack'][0]].cluster_gateway_ip } |
combine(
{
"openondemand_url": "https://" ~ (hostvars[groups['openstack'][0]].cluster_gateway_ip | replace('.', '-')) ~ ".sslip.io",
"azimuth_user_password": hostvars[groups['control'][0]].ansible_local.openhpc_secrets.vault_azimuth_user_password
}
if zenith_fqdn_ood is not defined
else {}
)
}}