- name: Wait to scale smoke app for first deployment
shell: "oc get rc --all-namespaces | grep smoke"
register: build_output
until: (build_output.stdout_lines | count) == (num_smoke_test_users + 1)
retries: 15
delay: 30
But it doesn't work. The error is:
TASK: [Wait to scale smoke app for first deployment] **************************
fatal: [ec2-52-20-117-193.compute-1.amazonaws.com] => error while evaluating conditional: (build_output.stdout_lines | count) == (num_smoke_test_users + 1)
FATAL: all hosts have already failed -- aborting
We iterate over num_smoke_test_users (0 to x which means x+1). We then create the smoke test app, and we wait for the RCs to show up. This means we are deployed and can scale. So, the output of:
oc get rc --all-namespaces | grep smoke should have num_smoke_test_users + 1 lines. For example, num_smoke_test_users = 40 means that we end up with 41 projects and apps, so there should be 41 rcs once everything is deployed.
We tried to do the following:
But it doesn't work. The error is:
We iterate over num_smoke_test_users (0 to x which means x+1). We then create the smoke test app, and we wait for the RCs to show up. This means we are deployed and can scale. So, the output of:
oc get rc --all-namespaces | grep smoke
should have num_smoke_test_users + 1 lines. For example, num_smoke_test_users = 40 means that we end up with 41 projects and apps, so there should be 41 rcs once everything is deployed.