Skip to content

Commit

Permalink
Get node name before patching to disable machineconfigpool
Browse files Browse the repository at this point in the history
In previous CRC version, node name is not "crc", but it is randomized.

Change-Id: I9c0245d0721a9558a22ffd72988efe3b067106f8
  • Loading branch information
danpawlik committed Jul 8, 2024
1 parent 4f5d2fa commit df727cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion roles/prepare-crc-extracted/tasks/machineconfigpool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@
- worker
changed_when: false

- name: Get node name
ansible.builtin.shell: |
oc get nodes --no-headers | awk '{print $1}'
register: _crc_node

- name: Patch node
ansible.builtin.shell: >
oc patch node crc
oc patch node {{ _crc_node.stdout }}
--type merge
-p '{"metadata": {"annotations": {"machineconfiguration.openshift.io/{{ item }}": null }}}'
loop:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@
- worker
changed_when: false

- name: Get node name
ansible.builtin.shell: |
oc get nodes --no-headers | awk '{print $1}'
register: _crc_node

- name: Patch node
ansible.builtin.shell: >
oc patch node crc
oc patch node {{ _crc_node.stdout }}
--type merge
-p '{"metadata": {"annotations": {"machineconfiguration.openshift.io/{{ item }}": null }}}'
loop:
Expand Down

0 comments on commit df727cf

Please sign in to comment.