|
1 | 1 | ---
|
2 |
| -- name: Fail if slurm_control_host or slurm_cluster_name or slurm_partitions are undefined |
| 2 | +- name: Fail if openhpc_slurm_control_host or openhpc_cluster_name or openhpc_slurm_partitions are undefined |
3 | 3 | fail:
|
4 |
| - msg: "Undefined slurm_control_host or slurm_cluster_name or slurm_partitions." |
| 4 | + msg: "Undefined openhpc_slurm_control_host or openhpc_cluster_name or openhpc_slurm_partitions." |
5 | 5 | when:
|
6 |
| - slurm_control_host == none or |
7 |
| - slurm_cluster_name == none or |
8 |
| - slurm_partitions | length == 0 |
| 6 | + openhpc_slurm_control_host == none or |
| 7 | + openhpc_cluster_name == none or |
| 8 | + openhpc_slurm_partitions | length == 0 |
9 | 9 |
|
10 | 10 | - name: Install OpenHPC runtime Slurm packages
|
11 | 11 | yum:
|
|
27 | 27 | - name: Ensure the Munge service is enabled
|
28 | 28 | service:
|
29 | 29 | name: munge
|
30 |
| - enabled: "{{ slurm_service_enabled | bool }}" |
| 30 | + enabled: "{{ openhpc_slurm_service_enabled | bool }}" |
31 | 31 | notify:
|
32 | 32 | - Restart Munge service
|
33 | 33 |
|
34 | 34 | - name: Generate a Munge key for the platform
|
35 | 35 | command: "dd if=/dev/urandom of=/etc/munge/munge.key bs=1 count=1024"
|
36 | 36 | args:
|
37 | 37 | creates: "/etc/munge/munge.key"
|
38 |
| - when: inventory_hostname == slurm_control_host |
| 38 | + when: inventory_hostname == openhpc_slurm_control_host |
39 | 39 |
|
40 | 40 | - name: Retrieve Munge key from Slurm control host
|
41 | 41 | slurp:
|
42 | 42 | src: "/etc/munge/munge.key"
|
43 | 43 | register: slurm_munge_key
|
44 |
| - when: inventory_hostname == slurm_control_host |
| 44 | + when: inventory_hostname == openhpc_slurm_control_host |
45 | 45 |
|
46 | 46 | - name: Write Munge key
|
47 | 47 | copy:
|
48 |
| - content: "{{ hostvars[slurm_control_host]['slurm_munge_key']['content'] | b64decode }}" |
| 48 | + content: "{{ hostvars[openhpc_slurm_control_host]['slurm_munge_key']['content'] | b64decode }}" |
49 | 49 | dest: "/etc/munge/munge.key"
|
50 | 50 | owner: munge
|
51 | 51 | group: munge
|
|
55 | 55 |
|
56 | 56 | - name: Ensure SLURM services are enabled
|
57 | 57 | service:
|
58 |
| - name: "{{ slurm_service }}" |
59 |
| - enabled: "{{ slurm_service_enabled | bool }}" |
| 58 | + name: "{{ openhpc_slurm_service }}" |
| 59 | + enabled: "{{ openhpc_slurm_service_enabled | bool }}" |
60 | 60 | notify:
|
61 | 61 | - Restart SLURM service
|
62 | 62 |
|
|
77 | 77 | # the handler, ensure it's running here.
|
78 | 78 | - name: Ensure SLURM services are running
|
79 | 79 | service:
|
80 |
| - name: "{{ slurm_service }}" |
81 |
| - state: "{{ 'started' if slurm_service_enabled | bool else 'stopped' }}" |
| 80 | + name: "{{ openhpc_slurm_service }}" |
| 81 | + state: "{{ 'started' if openhpc_slurm_service_enabled | bool else 'stopped' }}" |
82 | 82 |
|
83 | 83 | # Install OpenHPC runtime
|
84 | 84 | - name: Ensure selected OpenHPC packages are installed
|
|
0 commit comments