On Wed, 11 Sep 2019 02:57:51 -0700 (PDT) Kamesh Sampath <ksamp...@redhat.com> wrote:
> > > > > > > > > > > > until: che_keycloak.spec is defined > > > > > > > > > > > > can't find the parameter "spec" because there isn't any. > > > > > > the spec becomes available only after few seconds; so I need to keep the > > > lookup run until then. Thats why I had that until checking to see if > > > is defined in the fact. > > > > What is the failure (copy&paste) that "Sometimes I see the value is not > > being > > set and I get the failure after the retries."? > > > Exactly I see the value is not being set inspite of that is available after > few seconds . The failure throws an error like > "fatal: [localhost]: FAILED! => {"ansible_facts": {"che_keycloak": []}, > "attempts": 30, "changed": false}" OK. Set "ignore_errors: true", register and print "result". Post it. - set_fact: che_keycloak: "{{ lookup('k8s', api_version='route.openshift.io/v1', kind='Route', resource_name='keycloak', namespace='che') }}" register: result until: che_keycloak.spec is defined retries: 30 delay: 10 ignore_errors: true when: state == 'present' - debug: var: result -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/20190911125100.78a507f8%40gmail.com.
pgpJVSPsp5eqT.pgp
Description: OpenPGP digital signature