Browse Source

Merge pull request #8575 from mwoodson/master

fixed node label bug
Scott Dodson 6 years ago
parent
commit
ac45eb0ff7

+ 0 - 9
roles/openshift_node_group/defaults/main.yml

@@ -13,16 +13,7 @@ openshift_node_groups:
   - 'node-role.kubernetes.io/compute=true'
   edits: []
 
-l_openshift_node_group_master: "{{ openshift_node_group_master | default('node-config-master') }}"
-
-openshift_node_group_edits: []
 openshift_node_group_namespace: openshift-node
-openshift_node_group_labels: []
-
-openshift_node_labels_edit:
-- key: kubeletArguments.node-labels
-  value:
-  - "{{ openshift_node_group_labels | join(',') }}"
 
 openshift_use_crio: False
 l_crio_var_sock: "/var/run/crio/crio.sock"

+ 1 - 2
roles/openshift_node_group/tasks/create_config.yml

@@ -13,7 +13,7 @@
   run_once: true
 
 - when:
-  - configout.results.results.0 == {} or (configout.results.results.0 != {} and openshift_node_group_edits|length > 0)
+  - configout.results.results.0 == {} or (configout.results.results.0 != {} and (openshift_node_group_edits|length > 0 or openshift_node_group_labels|length > 0))
   block:
   - name: create a temp dir for this work
     command: mktemp -d /tmp/openshift_node_config-XXXXXX
@@ -42,7 +42,6 @@
       src: "{{ mktempout.stdout }}/node-config.yaml"
       edits: "{{ openshift_node_group_edits | union(openshift_node_labels_edit) }}"
     register: yeditout
-    when: openshift_node_group_edits|length > 0
     run_once: true
 
   - name: show the yeditout debug var

+ 8 - 0
roles/openshift_node_group/vars/main.yml

@@ -0,0 +1,8 @@
+---
+# These values should never be passed in, they are needed
+openshift_node_group_edits: []
+openshift_node_group_labels: []
+openshift_node_labels_edit:
+- key: kubeletArguments.node-labels
+  value:
+  - "{{ openshift_node_group_labels | join(',') }}"