main.yml 856 B

12345678910111213141516171819202122
  1. - name: Wait for Node Registration
  2. command: >
  3. {{ openshift.common.client_binary }} get node {{ item | lower }}
  4. register: omd_get_node
  5. until: omd_get_node.rc == 0
  6. retries: 50
  7. delay: 5
  8. changed_when: false
  9. with_items: "{{ openshift_nodes }}"
  10. - name: Set node schedulability
  11. command: >
  12. {{ openshift.common.admin_binary }} manage-node {{ item.openshift.common.hostname | lower }} --schedulable={{ 'true' if item.openshift.node.schedulable | bool else 'false' }}
  13. with_items:
  14. - "{{ openshift_node_vars }}"
  15. - name: Label nodes
  16. command: >
  17. {{ openshift.common.client_binary }} label --overwrite node {{ item.openshift.common.hostname | lower }} {{ item.openshift.node.labels | oo_combine_dict }}
  18. with_items:
  19. - "{{ openshift_node_vars }}"
  20. when: "'labels' in item.openshift.node and item.openshift.node.labels != {}"