Skip to content

Commit

Permalink
Indent slurm_parallelcluster_slurmdbd.conf Jinja template
Browse files Browse the repository at this point in the history
Add trick to have the logic for the renderization of the template
indented without affecting the final output. This improves the
comprehension of the logic embedded in the template (although
slightly visually impacting).

Signed-off-by: Jacopo De Amicis <[email protected]>
  • Loading branch information
jdeamicis committed Sep 25, 2023
1 parent ad85e77 commit e9e838d
Showing 1 changed file with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# slurm_parallelcluster_slurmdbd.conf is managed by the pcluster processes.
# Do not modify.
# Please add user-specific slurmdbd configuration options in slurmdbd.conf
{% if scaling_config.Database.Uri is defined %}
DbdHost={{ head_node_config.head_node_hostname }}
StorageHost={{ scaling_config.Database.Uri | uri_host }}
StoragePort={{ scaling_config.Database.Uri | uri_port }}
{% if scaling_config.Database.DatabaseName is defined %}
StorageLoc={{ scaling_config.Database.DatabaseName }}
{% else %}
{# Dashes in StorageLoc cause issues with the database creation #}
StorageLoc={{ cluster_name | replace("-", "_") }}
{% endif %}
StorageUser={{ scaling_config.Database.UserName }}
StoragePass=dummy
{% endif %}
{# Adding comments at the beginning of each line is a trick to indent the template without affecting the output #}
{##}# slurm_parallelcluster_slurmdbd.conf is managed by the pcluster processes.
{##}# Do not modify.
{##}# Please add user-specific slurmdbd configuration options in slurmdbd.conf
{##}{% if scaling_config.Database.Uri is defined %}
{# #}DbdHost={{ head_node_config.head_node_hostname }}
{# #}StorageHost={{ scaling_config.Database.Uri | uri_host }}
{# #}StoragePort={{ scaling_config.Database.Uri | uri_port }}
{# #}{% if scaling_config.Database.DatabaseName is defined %}
{# #}StorageLoc={{ scaling_config.Database.DatabaseName }}
{# #}{% else %}
{# #}{# Dashes in StorageLoc cause issues with the database creation #}
{# #}StorageLoc={{ cluster_name | replace("-", "_") }}
{# #}{% endif %}
{# #}StorageUser={{ scaling_config.Database.UserName }}
{# #}StoragePass=dummy
{##}{% endif %}

0 comments on commit e9e838d

Please sign in to comment.