diff --git a/defaults/main.yml b/defaults/main.yml index 17f6df5..04b5ced 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -105,6 +105,9 @@ slurm_accounting_storage_host: "{{ slurm_service_node }}" slurm_accounting_storage_type: "accounting_storage/slurmdbd" slurm_accounting_storage_loc: "slurm_acct_db" slurm_accounting_storage_user: "slurm" +# If you wish to add accounting for additional TRES types, uncomment +# and edit the following: +#slurm_accounting_storage_tres: "gres/gpu:teslak80,gres/gpu:teslak40" # If you wish to use a topology plugins (parameter TopologyPlugin=), # uncomment and edit the following: #slurm_topology_plugin: "topology/tree" diff --git a/templates/slurm.conf.j2 b/templates/slurm.conf.j2 index 55b351b..c527ff1 100644 --- a/templates/slurm.conf.j2 +++ b/templates/slurm.conf.j2 @@ -133,7 +133,11 @@ AccountingStorageLoc={{ slurm_accounting_storage_loc }} #AccountingStoragePass= AccountingStorageUser={{ slurm_accounting_storage_user }} AccountingStorageEnforce={{ slurm_accounting_storage_enforce }} - +{% if slurm_accounting_storage_tres is defined %} +AccuntingStorageTRES={{ slurm_accounting_storage_tres }} +{% elif slurm_with_gpu %} +AccountingStorageTRES=gres/gpu:teslak80 +{% endif %} # # TOPOLOGY