summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging/tasks/scale.yaml
diff options
context:
space:
mode:
authorewolinetz <ewolinet@redhat.com>2017-01-11 15:26:46 -0600
committerewolinetz <ewolinet@redhat.com>2017-01-12 10:55:38 -0600
commit06c111d22641ba5cc2dbbe0144d9d6722d94f159 (patch)
tree0d01d1b33fd69b386c17c0a32c51ed091a860363 /roles/openshift_logging/tasks/scale.yaml
parenta8c2999d94548d1c82b75387ef33d2e3f5c67536 (diff)
downloadopenshift-06c111d22641ba5cc2dbbe0144d9d6722d94f159.tar.gz
openshift-06c111d22641ba5cc2dbbe0144d9d6722d94f159.tar.bz2
openshift-06c111d22641ba5cc2dbbe0144d9d6722d94f159.tar.xz
openshift-06c111d22641ba5cc2dbbe0144d9d6722d94f159.zip
addressing comments
Diffstat (limited to 'roles/openshift_logging/tasks/scale.yaml')
-rw-r--r--roles/openshift_logging/tasks/scale.yaml16
1 files changed, 8 insertions, 8 deletions
diff --git a/roles/openshift_logging/tasks/scale.yaml b/roles/openshift_logging/tasks/scale.yaml
index 3d86ea171..aa3e39641 100644
--- a/roles/openshift_logging/tasks/scale.yaml
+++ b/roles/openshift_logging/tasks/scale.yaml
@@ -1,26 +1,26 @@
---
-- shell: >
+- command: >
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get {{object}}
- --template='{{ '{{.spec.replicas}}' }}' -n {{openshift_logging_namespace}}
+ -o jsonpath='{.spec.replicas}' -n {{openshift_logging_namespace}}
register: replica_count
failed_when: replica_count.rc == 1 and 'exists' not in replica_count.stderr
when: not ansible_check_mode
-- shell: >
+- command: >
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig scale {{object}}
--replicas={{desired}} -n {{openshift_logging_namespace}}
register: scale_result
failed_when: scale_result.rc == 1 and 'exists' not in scale_result.stderr
when:
- - replica_count.stdout != desired
- not ansible_check_mode
+ - replica_count.stdout|int != desired
-- shell: >
- {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig describe {{object}} -n {{openshift_logging_namespace}} | awk -v statusrx='Pods Status:' '$0 ~ statusrx {print $3}'
+- command: >
+ {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get {{object}} -n {{openshift_logging_namespace}} -o jsonpath='{.status.replicas}'
register: replica_counts
- until: replica_counts.stdout.find("{{desired}}") != -1
+ until: replica_counts.stdout|int == desired
retries: 30
delay: 10
when:
- - replica_count.stdout != desired
- not ansible_check_mode
+ - replica_count.stdout|int != desired