|
10 | 10 | return_content: true
|
11 | 11 | register: get_hosts
|
12 | 12 |
|
13 |
| -- name: Multi Node storage configuration |
14 |
| - block: |
15 |
| - - name: Apply controlplane host ignition config overrides |
16 |
| - uri: |
17 |
| - url: "http://{{ assisted_installer_host }}:{{ assisted_installer_port }}/api/assisted-install/v2/infra-envs/{{ ai_infraenv_id }}/hosts/{{ item.id }}/ignition" |
18 |
| - method: PATCH |
19 |
| - body_format: json |
20 |
| - status_code: [201] |
21 |
| - return_content: true |
22 |
| - body: { "config": "{{ lookup('template', 'controlplane.ign.j2') | to_json }}" } |
23 |
| - with_items: "{{ get_hosts.json|selectattr('role', 'eq', 'master') | list }}" |
24 |
| - when: (controlplane_etcd_on_nvme or controlplane_localstorage_configuration) |
25 |
| - |
26 |
| - - name: Apply worker host ignition config overrides |
27 |
| - uri: |
28 |
| - url: "http://{{ assisted_installer_host }}:{{ assisted_installer_port }}/api/assisted-install/v2/infra-envs/{{ ai_infraenv_id }}/hosts//{{ item.id }}/ignition" |
29 |
| - method: PATCH |
30 |
| - body_format: json |
31 |
| - status_code: [201] |
32 |
| - return_content: true |
33 |
| - body: { "config": "{{ lookup('template', 'worker.ign.j2') | to_json }}" } |
34 |
| - with_items: "{{ get_hosts.json|selectattr('role', 'eq', 'worker') | list }}" |
35 |
| - when: worker_localstorage_configuration |
36 |
| - when: cluster_type != "sno" |
| 13 | +# Applies both SNO and MNO control-plane Etcd on NVME and/or localstorage configuration |
| 14 | +- name: Apply controlplane host ignition config overrides |
| 15 | + uri: |
| 16 | + url: "http://{{ assisted_installer_host }}:{{ assisted_installer_port }}/api/assisted-install/v2/infra-envs/{{ ai_infraenv_id }}/hosts/{{ item.id }}/ignition" |
| 17 | + method: PATCH |
| 18 | + body_format: json |
| 19 | + status_code: [201] |
| 20 | + return_content: true |
| 21 | + body: { "config": "{{ lookup('template', 'controlplane.ign.j2') | to_json }}" } |
| 22 | + with_items: "{{ get_hosts.json|selectattr('role', 'eq', 'master') | list }}" |
| 23 | + when: (controlplane_etcd_on_nvme or controlplane_localstorage_configuration) |
37 | 24 |
|
38 |
| -- name: Apply sno host ignition config overrides |
| 25 | +- name: Apply worker host ignition config overrides |
39 | 26 | uri:
|
40 |
| - url: "http://{{ assisted_installer_host }}:{{ assisted_installer_port }}/api/assisted-install/v2/infra-envs/{{ ai_infraenv_id }}/hosts/{{ get_hosts.json[0].id }}/ignition" |
| 27 | + url: "http://{{ assisted_installer_host }}:{{ assisted_installer_port }}/api/assisted-install/v2/infra-envs/{{ ai_infraenv_id }}/hosts//{{ item.id }}/ignition" |
41 | 28 | method: PATCH
|
42 | 29 | body_format: json
|
43 | 30 | status_code: [201]
|
44 | 31 | return_content: true
|
45 |
| - body: { "config": "{{ lookup('template', 'sno.ign.j2') | to_json }}" } |
46 |
| - when: cluster_type == "sno" and sno_localstorage_configuration |
| 32 | + body: { "config": "{{ lookup('template', 'worker.ign.j2') | to_json }}" } |
| 33 | + with_items: "{{ get_hosts.json|selectattr('role', 'eq', 'worker') | list }}" |
| 34 | + when: |
| 35 | + - worker_localstorage_configuration |
| 36 | + - cluster_type != "sno" |
0 commit comments