summaryrefslogtreecommitdiffstats
path: root/roles/openshift_manage_node/tasks/main.yml
blob: e64d6e7131cd0094876c50b61dfb7b253fd95757 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
- name: Wait for Node Registration
  command: >
      {{ openshift.common.client_binary }} get node {{ item }}
  register: omd_get_node
  until: omd_get_node.rc == 0
  retries: 10
  delay: 5
  with_items: openshift_nodes

- name: Handle unscheduleable node
  command: >
    {{ openshift.common.admin_binary }} manage-node {{ item }} --schedulable=false
  with_items: openshift_unscheduleable_nodes

- name: Handle scheduleable node
  command: >
    {{ openshift.common.admin_binary }} manage-node {{ item }} --schedulable=true
  with_items: openshift_scheduleable_nodes

- name: Tag schedulable nodes
  command: >
    {{ openshift.common.client_binary }} label --overwrite node {{ item.0 }} {{ item.1 | oo_combine_dict }}
  with_nested:
    -  openshift_scheduleable_nodes
    -  openshift_node_labels