From b497f7a2a77c3ef1434a5f0bd11fccf9d81b44aa Mon Sep 17 00:00:00 2001 From: Diego Castro Date: Tue, 4 Aug 2015 11:10:35 -0300 Subject: Fix node labeling. Issue #305 --- roles/openshift_manage_node/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'roles/openshift_manage_node') diff --git a/roles/openshift_manage_node/tasks/main.yml b/roles/openshift_manage_node/tasks/main.yml index d17f3f532..e64d6e713 100644 --- a/roles/openshift_manage_node/tasks/main.yml +++ b/roles/openshift_manage_node/tasks/main.yml @@ -16,3 +16,10 @@ 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 \ No newline at end of file -- cgit v1.2.3 From 6be237602331e88a330c1f46d31aeb97d9af1aa2 Mon Sep 17 00:00:00 2001 From: "Diego Castro (dscastro)" Date: Tue, 4 Aug 2015 11:53:07 -0300 Subject: Applying changes suggested by @sdodson --- roles/openshift_manage_node/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'roles/openshift_manage_node') diff --git a/roles/openshift_manage_node/tasks/main.yml b/roles/openshift_manage_node/tasks/main.yml index e64d6e713..257bcee2c 100644 --- a/roles/openshift_manage_node/tasks/main.yml +++ b/roles/openshift_manage_node/tasks/main.yml @@ -17,9 +17,9 @@ {{ openshift.common.admin_binary }} manage-node {{ item }} --schedulable=true with_items: openshift_scheduleable_nodes -- name: Tag schedulable nodes +- name: Label nodes command: > {{ openshift.common.client_binary }} label --overwrite node {{ item.0 }} {{ item.1 | oo_combine_dict }} with_nested: - - openshift_scheduleable_nodes - - openshift_node_labels \ No newline at end of file + - openshift_nodes + - openshift_node_labels -- cgit v1.2.3 From c17efa0172a11f79cb28d3c5740b7c16ed70c3b8 Mon Sep 17 00:00:00 2001 From: Diego Castro Date: Sun, 9 Aug 2015 12:40:28 -0300 Subject: Fix node labels --- roles/openshift_manage_node/tasks/main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'roles/openshift_manage_node') diff --git a/roles/openshift_manage_node/tasks/main.yml b/roles/openshift_manage_node/tasks/main.yml index 257bcee2c..c488af723 100644 --- a/roles/openshift_manage_node/tasks/main.yml +++ b/roles/openshift_manage_node/tasks/main.yml @@ -19,7 +19,6 @@ - name: Label nodes command: > - {{ openshift.common.client_binary }} label --overwrite node {{ item.0 }} {{ item.1 | oo_combine_dict }} - with_nested: - - openshift_nodes - - openshift_node_labels + {{ openshift.common.client_binary }} label --overwrite node {{ item }} {{ hostvars[item]['openshift_node_labels'] | oo_combine_dict }} + with_items: + - "{{ openshift_nodes }}" -- cgit v1.2.3 From 9a41d23f553ab638af22f54fbd30c4de3b0eae18 Mon Sep 17 00:00:00 2001 From: Diego Castro Date: Mon, 10 Aug 2015 11:50:57 -0300 Subject: Don't try to label node if there's no labels --- roles/openshift_manage_node/tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'roles/openshift_manage_node') diff --git a/roles/openshift_manage_node/tasks/main.yml b/roles/openshift_manage_node/tasks/main.yml index c488af723..472d63efe 100644 --- a/roles/openshift_manage_node/tasks/main.yml +++ b/roles/openshift_manage_node/tasks/main.yml @@ -22,3 +22,5 @@ {{ openshift.common.client_binary }} label --overwrite node {{ item }} {{ hostvars[item]['openshift_node_labels'] | oo_combine_dict }} with_items: - "{{ openshift_nodes }}" + when: + "'openshift_node_labels' in hostvars[item]" -- cgit v1.2.3