File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 4343 # below produced by dev/setup-env.sh - gives empty list if file is missing:
4444 _requirements_installed : " {{ ((lookup('file', _requirements_path + '.last', errors='ignore') or '{}') | from_yaml ).values() | flatten }}"
4545
46+ - name : Validate OpenTofu templated inventory is appropriate
47+ # This "documents" the assumptions that Ansible makes about the
48+ # OpenTofu-provided inventory
49+ hosts : localhost
50+ gather_facts : false
51+ tags :
52+ - validate
53+ - opentofu
54+ tasks :
55+ - name : Check templated groups
56+ assert :
57+ that :
58+ - item in groups
59+ - groups[item] | length > 0
60+ fail_msg : " Expected inventory group '{{ item }}' is missing or empty: is OpenTofu inventory template up to date?"
61+ loop :
62+ - control
63+ - compute
64+ - login
65+ - name : Check templated 'all' vars
66+ assert :
67+ that :
68+ - openhpc_cluster_name is defined
69+ - cluster_domain_suffix is defined
70+ - cluster_home_volume is defined
71+ - cluster_compute_groups is defined
72+ fail_msg : " One or more expected variables are missing: is OpenTofu inventory template up to date?"
73+
4674- name : Ensure control node is in inventory
4775 hosts : all
4876 gather_facts : false
You can’t perform that action at this time.
0 commit comments