config.yml 934 B

123456789101112131415161718192021222324252627
  1. ---
  2. - name: Set node schedulability
  3. oc_adm_manage_node:
  4. node: "{{ openshift.node.nodename | lower }}"
  5. schedulable: "{{ 'true' if l_openshift_manage_schedulable | bool else 'false' }}"
  6. retries: 10
  7. delay: 5
  8. register: node_schedulable
  9. until: node_schedulable is succeeded
  10. when: "'nodename' in openshift.node"
  11. delegate_to: "{{ openshift_master_host }}"
  12. - name: Label nodes
  13. oc_label:
  14. name: "{{ openshift.node.nodename }}"
  15. kind: node
  16. state: add
  17. labels: "{{ l_all_labels | lib_utils_oo_dict_to_list_of_dict }}"
  18. namespace: default
  19. when:
  20. - "'nodename' in openshift.node"
  21. - l_all_labels != {}
  22. delegate_to: "{{ openshift_master_host }}"
  23. vars:
  24. l_node_labels: "{{ openshift_node_labels | default({}) }}"
  25. l_master_labels: "{{ ('oo_masters_to_config' in group_names) | ternary(openshift_master_node_labels, {}) }}"
  26. l_all_labels: "{{ l_node_labels | combine(l_master_labels) }}"