|
14 | 14 | roles: |
15 | 15 | - role: stackhpc.terraform-infra |
16 | 16 | vars: |
| 17 | + # Image cloud user, use extraVars.__ALL__.cluster_user in values.yaml |
| 18 | + # to change if required |
| 19 | + cluster_ssh_user: "{{ cluster_user | default('rocky') }}" |
17 | 20 | # Variables controlling the Terraform provisioning |
18 | 21 | terraform_project_path: "{{ playbook_dir }}/terraform" |
19 | 22 | terraform_state: "{{ cluster_state | default('present') }}" |
| 23 | + terraform_backend_type: "{{ ( 'CONSUL_HTTP_ADDR' in ansible_env ) | ternary('consul', 'local') }}" |
| 24 | + terraform_backend_config: "{{ terraform_backend_config_defaults[terraform_backend_type] }}" |
20 | 25 | terraform_variables: |
21 | 26 | cluster_name: "{{ cluster_name }}" |
22 | 27 | cluster_network: "{{ cluster_network }}" |
|
77 | 82 | # Configure the hosts as a Slurm cluster |
78 | 83 | # Use the playbooks invidually rather than the site playbook as it avoids the |
79 | 84 | # need to define the environment variables referencing an environment |
| 85 | + |
| 86 | +# validate.yml asserts presence of a control group which doesn't exist when |
| 87 | +# destroying infra, so only validate when we're not destroying |
80 | 88 | - import_playbook: vendor/stackhpc/ansible-slurm-appliance/ansible/validate.yml |
| 89 | + when: cluster_state is not defined or (cluster_state is defined and cluster_state != "absent") |
81 | 90 |
|
82 | 91 | # The first task in the bootstrap playbook causes the home directory of the centos user to be moved |
83 | 92 | # on the first run |
|
100 | 109 | meta: reset_connection |
101 | 110 |
|
102 | 111 | - import_playbook: vendor/stackhpc/ansible-slurm-appliance/ansible/bootstrap.yml |
103 | | - |
104 | 112 | - import_playbook: vendor/stackhpc/ansible-slurm-appliance/ansible/filesystems.yml |
105 | 113 | - import_playbook: vendor/stackhpc/ansible-slurm-appliance/ansible/slurm.yml |
106 | | - |
107 | | -# Temporarily, the grafana_install tag is skipped (see ansible.cfg) and we install Grafana manually here |
108 | | -# https://github.com/grafana/grafana/issues/36935 |
109 | | -# TODO: REMOVE THIS |
110 | | -- name: Install Grafana |
111 | | - hosts: grafana |
112 | | - tags: grafana |
113 | | - gather_facts: no |
114 | | - become: yes |
115 | | - tasks: |
116 | | - - name: Install Grafana from RPM |
117 | | - yum: |
118 | | - name: https://dl.grafana.com/oss/release/grafana-8.0.6-1.x86_64.rpm |
119 | | - disable_gpg_check: yes |
120 | | - state: present |
121 | | - |
122 | 114 | - import_playbook: vendor/stackhpc/ansible-slurm-appliance/ansible/monitoring.yml |
123 | | -- import_playbook: vendor/stackhpc/ansible-slurm-appliance/ansible/adhoc/test.yml |
| 115 | +- import_playbook: vendor/stackhpc/ansible-slurm-appliance/ansible/adhoc/hpctests.yml |
0 commit comments