12345678910111213141516171819202122232425262728293031323334 |
- ---
- - name: List existing worker nodes
- k8s_facts:
- kubeconfig: "{{ kubeconfig_path }}"
- kind: Node
- label_selectors:
- - "node-role.kubernetes.io/worker"
- register: pre_scaleup_workers
- until:
- - pre_scaleup_workers.resources is defined
- - pre_scaleup_workers.resources | length > 0
- retries: 36
- delay: 5
- - name: Set fact pre_scaleup_workers_name
- set_fact:
- pre_scaleup_workers_name: "{{ pre_scaleup_workers.resources | map(attribute='metadata.name') | list }}"
- - name: Get existing worker machinesets
- k8s_facts:
- api_version: machine.openshift.io/v1beta1
- kubeconfig: "{{ kubeconfig_path }}"
- namespace: openshift-machine-api
- kind: MachineSet
- register: machineset
- until:
- - machineset.resources is defined
- - machineset.resources | length > 0
- retries: 36
- delay: 5
- - name: Set fact pre_scaleup_machineset_names
- set_fact:
- pre_scaleup_machineset_names: "{{ machineset.resources | map(attribute='metadata.name') | list }}"
|