summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging
diff options
context:
space:
mode:
authorewolinetz <ewolinet@redhat.com>2017-02-01 15:52:46 -0600
committerewolinetz <ewolinet@redhat.com>2017-02-01 15:52:46 -0600
commitf6c5d4ca41da66b933b600ae5a871624db92a68e (patch)
tree12d8deaa64ec46e9daa0e3057a5dd5989dca0309 /roles/openshift_logging
parent64423cc6a7772b4ba894f05b5c18de3a0895570d (diff)
downloadopenshift-f6c5d4ca41da66b933b600ae5a871624db92a68e.tar.gz
openshift-f6c5d4ca41da66b933b600ae5a871624db92a68e.tar.bz2
openshift-f6c5d4ca41da66b933b600ae5a871624db92a68e.tar.xz
openshift-f6c5d4ca41da66b933b600ae5a871624db92a68e.zip
Updating oc_apply to use command instead of shell
Diffstat (limited to 'roles/openshift_logging')
-rw-r--r--roles/openshift_logging/tasks/oc_apply.yaml12
1 files changed, 7 insertions, 5 deletions
diff --git a/roles/openshift_logging/tasks/oc_apply.yaml b/roles/openshift_logging/tasks/oc_apply.yaml
index 5897910ee..cb9509de1 100644
--- a/roles/openshift_logging/tasks/oc_apply.yaml
+++ b/roles/openshift_logging/tasks/oc_apply.yaml
@@ -1,12 +1,13 @@
---
- name: Checking generation of {{file_content.kind}} {{file_content.metadata.name}}
- shell: >
+ command: >
{{ openshift.common.client_binary }}
--config={{ kubeconfig }}
get {{file_content.kind}} {{file_content.metadata.name}}
-o jsonpath='{.metadata.resourceVersion}'
- -n {{namespace}} || echo 0
+ -n {{namespace}}
register: generation_init
+ failed_when: "'not found' not in generation_init.stderr and generation_init.stdout == ''"
changed_when: no
- name: Applying {{file_name}}
@@ -19,13 +20,14 @@
changed_when: no
- name: Determine change status of {{file_content.kind}} {{file_content.metadata.name}}
- shell: >
+ command: >
{{ openshift.common.client_binary }} --config={{ kubeconfig }}
get {{file_content.kind}} {{file_content.metadata.name}}
-o jsonpath='{.metadata.resourceVersion}'
- -n {{namespace}} || echo 0
+ -n {{namespace}}
register: generation_changed
- changed_when: generation_changed.stdout | int > generation_init.stdout | int
+ failed_when: "'not found' not in generation_changed.stderr and generation_changed.stdout == ''"
+ changed_when: generation_changed.stdout | default (0) | int > generation_init.stdout | default(0) | int
when:
- "'field is immutable' not in generation_apply.stderr"