Skip to content

Commit 34e84fa

Browse files
committed
improve readability of group_vars
1 parent ed1bfa5 commit 34e84fa

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

environments/common/inventory/group_vars/all/openhpc.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,16 @@ openhpc_packages_extra: []
3131
openhpc_packages: "{{ openhpc_packages_default + openhpc_packages_extra }}"
3232
openhpc_munge_key: "{{ vault_openhpc_mungekey | b64decode }}"
3333
openhpc_login_only_nodes: login
34-
openhpc_config_default: >-
35-
{{
36-
{
37-
'SlurmctldParameters': ['enable_configless'] +
38-
(['reboot_from_controller'] if groups['rebuild'] | length > 0 else []),
39-
'TaskPlugin': 'task/cgroup,task/affinity'
40-
}
41-
| combine(
42-
{'RebootProgram': '/opt/slurm-tools/bin/slurm-openstack-rebuild'} if groups['rebuild'] | length > 0 else {}
43-
)
44-
}}
34+
openhpc_config_default:
35+
SlurmctldParameters:
36+
- enable_configless
37+
TaskPlugin: task/cgroup,task/affinity
38+
openhpc_config_reboot:
39+
RebootProgram: /opt/slurm-tools/bin/slurm-openstack-rebuild
40+
SlurmctldParameters:
41+
- reboot_from_controller
4542
openhpc_config_extra: {}
46-
openhpc_config: "{{ openhpc_config_default | combine(openhpc_config_extra, list_merge='append') }}"
43+
openhpc_config: "{{ openhpc_config_default | combine(openhpc_config_reboot if groups['rebuild'] | length > 0 else {}, openhpc_config_extra, list_merge='append') }}"
4744
openhpc_state_save_location: "{{ appliances_state_dir + '/slurmctld' if appliances_state_dir is defined else '/var/spool' }}"
4845

4946
openhpc_install_type: ohpc # 'ohpc' or 'generic', see https://github.com/stackhpc/ansible-slurm-appliance/pull/326

environments/common/inventory/groups

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,4 @@ extra_packages
164164
# Add builder to this group to enable automatically syncing of pulp during image build
165165

166166
[rebuild]
167-
# Enable rebuild of nodes on an OpenStack cloud; add 'control' group plus 'compute' group or a subset of it.
167+
# Enable rebuild of nodes on an OpenStack cloud; add 'control' group.

0 commit comments

Comments
 (0)