File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
3
+ - name : Validate configuration
4
+ block :
5
+ - include_tasks : validate
6
+ when : openhpc_enable.runtime | default(false) | bool
7
+ tags : install
8
+
3
9
- name : Install packages
4
10
block :
5
11
- include_tasks : install.yml
Original file line number Diff line number Diff line change
1
+ - name : Check openhpc_slurm_control_host and openhpc_cluster_name
2
+ assert :
3
+ that :
4
+ - openhpc_slurm_control_host is defined
5
+ - openhpc_slurm_control_host != ''
6
+ - openhpc_cluster_name is defined
7
+ - openhpc_cluster_name != ''
8
+ fail_msg : openhpc role variables not correctly defined, see detail above
9
+
10
+ - name : Check no host appears in more than one nodegroup
11
+ assert :
12
+ that : " {{ _openhpc_check_hosts.values() | select('greaterthan', 1) | length == 0}}"
13
+ fail_msg : |
14
+ Some hosts appear more than once in inventory groups {{ _openhpc_node_inventory_groups | join(', ') }}:
15
+ {{ _openhpc_check_hosts | dict2items | rejectattr('value', 'equalto', 1) | items2dict | to_nice_yaml }}
16
+ vars :
17
+ _openhpc_node_inventory_groups : " {{ openhpc_nodegroups | map(attribute='name') | map('regex_replace', '^', openhpc_cluster_name ~ '_') }}"
18
+ _openhpc_check_hosts : " {{ _openhpc_node_inventory_groups | map('extract', groups) | flatten | community.general.counter }}"
19
+
20
+ - name : Fail if configuration is old
21
+ assert :
22
+ that : openhpc_slurm_partitions is not defined
23
+ fail_msg : stackhpc.openhpc parameter openhpc_slurm_partitions has been replaced - see openhpc_nodegroups and openhpc_partitions
You can’t perform that action at this time.
0 commit comments