main.yml 846 B

1234567891011121314151617181920212223242526
  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 }} {{ hostvars[item]['openshift_node_labels'] | oo_combine_dict }}
  20. with_items:
  21. - "{{ openshift_nodes }}"
  22. when:
  23. "'openshift_node_labels' in hostvars[item]"