Skip to content

Conversation

@milliams
Copy link
Member

@milliams milliams commented Nov 27, 2025

Adds some Ansible magic to use a new variable nodegroups_map which contains instructions for matching node groups and injecting new data into them.

nodegroups_map:
  - key: "name"
    test: "match"
    args: ["gpu-.*"]
    inject:
      gres:
        - conf: "gpu:A100:1"
          file: "/dev/nvidia0"

says to find any node groups where the key ("name") matches "gpu-.*", and merge in the given inject dictionary.

So,

[
  {
    "name": "general-gen2-rack6"
  },
  {
    "name": "gpu-gpu1"
  }
]

becomes:

[
  {
    "name": "general-gen2-rack6"
  },
  {
    "name": "gpu-gpu1",
    "gres": {"conf": "gpu:A100:1", "file": "/dev/nvidia0"}
  }
]

This relates to isambard-sc/dl-bc5#17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants