File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
- include_tasks : pre.yml
4
4
5
- - name : Check openhpc_slurm_control_host, openhpc_cluster_name or openhpc_slurm_partitions exist
6
- assert :
7
- that :
8
- - openhpc_slurm_control_host is defined
9
- - openhpc_cluster_name is defined
10
- - openhpc_cluster_name != ''
11
- - openhpc_slurm_partitions is defined
12
- fail_msg : " Undefined openhpc_slurm_control_host, openhpc_cluster_name or openhpc_slurm_partitions."
13
-
14
5
- name : Fail if control host not in play and munge key not specified
15
6
fail :
16
7
msg : " Either the slurm control node must be in the play or `openhpc_munge_key` must be set"
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 }}"
You can’t perform that action at this time.
0 commit comments