main.yml 885 B

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