main.yml 826 B

123456789101112131415161718192021
  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: 20
  7. delay: 5
  8. with_items: openshift_nodes
  9. - name: Set node schedulability
  10. command: >
  11. {{ openshift.common.admin_binary }} manage-node {{ item.openshift.common.hostname | lower }} --schedulable={{ 'true' if item.openshift.node.schedulable | bool else 'false' }}
  12. with_items:
  13. - "{{ openshift_node_vars }}"
  14. - name: Label nodes
  15. command: >
  16. {{ openshift.common.client_binary }} label --overwrite node {{ item.openshift.common.hostname | lower }} {{ item.openshift.node.labels | oo_combine_dict }}
  17. with_items:
  18. - "{{ openshift_node_vars }}"
  19. when: "'labels' in item.openshift.node and item.openshift.node.labels != {}"