Skip to content

Commit f4ec620

Browse files
committed
WIP: fix munge key for molecule
1 parent 483b0ac commit f4ec620

File tree

8 files changed

+58
-1
lines changed

8 files changed

+58
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ each list element:
4242

4343
Note slurm's ["configless" mode](https://slurm.schedmd.com/configless_slurm.html) is always used.
4444

45-
`openhpc_munge_key`: Required. Define a munge key to use.
45+
`openhpc_munge_key`: Required. A munge key to use.
4646

4747
`openhpc_login_only_nodes`: Optional. The name of an ansible inventory group containing nodes which are login nodes (i.e. not also control nodes). These nodes must have `openhpc_enable.batch: true` and will run `slurmd` to contact the control node for config.
4848

@@ -150,6 +150,7 @@ The following playbook deploys control, login and compute nodes with a customise
150150
openhpc_slurm_partitions:
151151
- name: "compute"
152152
openhpc_cluster_name: openhpc
153+
openhpc_munge_key: "{{ my_secret_blob }}"
153154
openhpc_slurm_conf_overrides: |
154155
SlurmctldDebug=debug
155156
SlurmdDebug=debug

molecule/test1/converge.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
- name: "compute"
1212
openhpc_cluster_name: testohpc
1313
tasks:
14+
- name: Get package-generated munge key
15+
slurp:
16+
src: /etc/munge/munge.key
17+
register: _munge_key
18+
when: inventory_hostname == 'testohpc-login-0'
19+
- name: Set fact for munge key
20+
set_fact:
21+
openhpc_munge_key: "{{ hostvars['testohpc-login-0']._munge_key.content | b64decode }}"
1422
- name: "Include ansible-role-openhpc"
1523
include_role:
1624
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

molecule/test2/converge.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
- name: "part2"
1313
openhpc_cluster_name: testohpc
1414
tasks:
15+
- name: Get package-generated munge key
16+
slurp:
17+
src: /etc/munge/munge.key
18+
register: _munge_key
19+
when: inventory_hostname == 'testohpc-login-0'
20+
- name: Set fact for munge key
21+
set_fact:
22+
openhpc_munge_key: "{{ hostvars['testohpc-login-0']._munge_key.content | b64decode }}"
1523
- name: "Include ansible-role-openhpc"
1624
include_role:
1725
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

molecule/test3/converge.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
- name: "grp2"
1515
openhpc_cluster_name: testohpc
1616
tasks:
17+
- name: Get package-generated munge key
18+
slurp:
19+
src: /etc/munge/munge.key
20+
register: _munge_key
21+
when: inventory_hostname == 'testohpc-login-0'
22+
- name: Set fact for munge key
23+
set_fact:
24+
openhpc_munge_key: "{{ hostvars['testohpc-login-0']._munge_key.content | b64decode }}"
1725
- name: "Include ansible-role-openhpc"
1826
include_role:
1927
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

molecule/test4/converge.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
- name: "compute"
1616
openhpc_cluster_name: testohpc
1717
tasks:
18+
- name: Get package-generated munge key
19+
slurp:
20+
src: /etc/munge/munge.key
21+
register: _munge_key
22+
when: inventory_hostname == 'testohpc-login-0'
23+
- name: Set fact for munge key
24+
set_fact:
25+
openhpc_munge_key: "{{ hostvars['testohpc-login-0']._munge_key.content | b64decode }}"
1826
- name: "Include ansible-role-openhpc"
1927
include_role:
2028
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

molecule/test5/converge.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
openhpc_cluster_name: testohpc
1313
openhpc_slurm_configless: true
1414
tasks:
15+
- name: Get package-generated munge key
16+
slurp:
17+
src: /etc/munge/munge.key
18+
register: _munge_key
19+
when: inventory_hostname == 'testohpc-login-0'
20+
- name: Set fact for munge key
21+
set_fact:
22+
openhpc_munge_key: "{{ hostvars['testohpc-login-0']._munge_key.content | b64decode }}"
1523
- name: "Include ansible-role-openhpc"
1624
include_role:
1725
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

molecule/test6/converge.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
openhpc_cluster_name: testohpc
1212
openhpc_slurm_configless: true
1313
tasks:
14+
- name: Get package-generated munge key
15+
slurp:
16+
src: /etc/munge/munge.key
17+
register: _munge_key
18+
when: inventory_hostname == 'testohpc-login-0'
19+
- name: Set fact for munge key
20+
set_fact:
21+
openhpc_munge_key: "{{ hostvars['testohpc-login-0']._munge_key.content | b64decode }}"
1422
- name: "Include ansible-role-openhpc"
1523
include_role:
1624
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

molecule/test8/converge.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
openhpc_slurm_configless: true
1414
openhpc_login_only_nodes: 'testohpc_login'
1515
tasks:
16+
- name: Get package-generated munge key
17+
slurp:
18+
src: /etc/munge/munge.key
19+
register: _munge_key
20+
when: inventory_hostname == 'testohpc-control'
21+
- name: Set fact for munge key
22+
set_fact:
23+
openhpc_munge_key: "{{ hostvars['testohpc-control']._munge_key.content | b64decode }}"
1624
- name: "Include ansible-role-openhpc"
1725
include_role:
1826
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

0 commit comments

Comments
 (0)