Browse Source

Merge pull request #10423 from sdodson/bz1634700

Remove value rather than replacing it with an empty string
Scott Dodson 6 năm trước cách đây
mục cha
commit
298db898d3
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      roles/openshift_control_plane/tasks/upgrade.yml

+ 3 - 2
roles/openshift_control_plane/tasks/upgrade.yml

@@ -78,8 +78,9 @@
   yedit:
     src: "{{ openshift.common.config_base }}/master/master-config.yaml"
     key: "kubernetesMasterConfig.apiServerArguments.runtime-config"
-    value: "{{ runtime_config.result | join(',') | regex_replace('(?:,)*apis/settings\\.k8s\\.io/v1alpha1=true','') }}"
-  when: runtime_config.result
+    value: "{{ r_c | difference(['apis/settings.k8s.io/v1alpha1=true']) }}"
+  vars:
+    r_c: "{{ runtime_config.result | default([]) }}"
 - name: Copy recyler pod to config directory
   template:
     src: "recycler_pod.yaml.j2"