Skip to content

generating slurm.conf values #34

Open
@vphan13

Description

@vphan13

I'm a bit of an ansible noob here. . .but,

When generating the slurm.conf file

Instead of hard coded values:
slurm_nodes:

  • name: "{{ headnode }}"
    CoresPerSocket: "6"
    CPUs: "12"
    Gres: "gpu:p620:1"
    NodeAddr: "{{ headnode }}"
    RealMemory: "31846"
    Sockets: "1"
    ThreadsPerCore: "2"
    Feature: "gpu,intel,ht"
    State: "UNKNOWN"

Is it possible to get the values from ansible_facts . . .something along the lines of

slurm_nodes:

  • name: "{{ headnode }}"
    CoresPerSocket: "{{ ansible_facts['ansible_processor_cores'] }}"
    CPUs: "{{ ansible_facts['ansible_processor_vcpu'] }}"
    Gres: "gpu:p620:1"
    NodeAddr: "{{ headnode }}"
    RealMemory: {{ ansible_facts['ansible_memory_mb.real.total'] }}
    Sockets: "1"
    ThreadsPerCore: "{{ ansible_facts['ansible_processor_threads_per_core'] }}"
    Feature: "gpu,intel,ht"
    State: "UNKNOWN"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions