Skip to content

Need help creating a minimal non-trivial playbook #33

Open
@marinegor

Description

@marinegor

Hi everyone, I'm struggling with creating a playbook that would install both control and execution nodes.
Whatever I do, I end up with multiple nodes where each of them is a singleton cluster with single node in it, and there's no interconnectivity between them.

Minimal playbook:

- name: install SLURM cluster
  hosts: vm0
  roles:
    - role: galaxyproject.slurm
      become: True
  vars:
    slurm_roles: ['exec', 'dbd', 'controller']
    slurm_munge_key: munge.key

- name: SLURM execution hosts
  roles:
    - role: galaxyproject.slurm
      become: True
  hosts: vm1, vm2
  vars:
    slurm_munge_key: munge.key
    slurm_roles: ['exec']
    slurm_nodes:
      - name: "vm[1-2]"
        CoresPerSocket: 1
    slurm_partitions:
      - name: compute
        Default: YES
        MaxTime: UNLIMITED
        Nodes: "vm[1-2]"

and the output would be:

~/github/slurm_local
❯ ansible -i local.yml all -a 'sinfo'
vm1 | CHANGED | rc=0 >>
PARTITION AVAIL  TIMELIMIT  NODES  STATE NODELIST
debug*       up   infinite      1   idle localhost
vm2 | CHANGED | rc=0 >>
PARTITION AVAIL  TIMELIMIT  NODES  STATE NODELIST
debug*       up   infinite      1   idle localhost
vm0 | CHANGED | rc=0 >>
PARTITION AVAIL  TIMELIMIT  NODES  STATE NODELIST
debug*       up   infinite      1   idle localhost

which is not what I intended.

Could anyone help drafting a correct playbook for such a case?

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