Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tasks/_inc_extra_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
- name: gres.conf
config: slurm_gres_config
template: gres.conf.j2
- name: namespace.yaml
config: namespace_config
template: generic.yaml.j2
loop_control:
label: "{{ item.name }}"
when: item.config in vars
Expand Down
15 changes: 15 additions & 0 deletions templates/generic.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
##
## This file is maintained by Ansible - ALL MODIFICATIONS WILL BE REVERTED
##

{% set conf = lookup('vars', item.config) %}
{% for key in conf | sort %}
{{ key }}:
{% set val = conf[key] %}
{% for nkey in val %}
{% set nval = val[nkey] %}
{% if nval is not none and nval != omit %}
{{nkey }}: {{ 'true' if nval is sameas true else ('false' if nval is sameas false else nval) }}
{% endif %}
{% endfor %}
{% endfor %}