On Wed, 11 Sep 2019 00:22:50 -0700 (PDT)
Kamesh Sampath <ksamp...@redhat.com> wrote:

> I am trying to use `set_fact` with `until` and `retries`, will the fact be 
> evaluated and set during each iteration ? Sometimes I see the value is not 
> being set and I get the failure after the retries. While I see the 
> corresponding lookup returns value using another cli.
> 
> - name: "Get Che Keycloak facts"
> >   set_fact:
> >     che_keycloak: 
> > "{{ lookup('k8s', 
> > api_version='route.openshift.io/v1',kind='Route',resource_name='keycloak',namespace='che')
> >  }}"
> >   register: che_keycloak_route_result
> >   until: che_keycloak.spec is defined
> >   retries: 30
> >   delay: 10
> >   when: state == 'present'

Yes. The the fact will be evaluated and set on each iteration. The problem is
that "set_fact" declares the variable "che_keycloak". The condition

      until: che_keycloak.spec is defined

can't find the parameter "spec" because there isn't any.

Cheers,

        -vlado

-- 
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/20190911103949.5bca09a8%40gmail.com.

Attachment: pgpaPeXQflUbP.pgp
Description: OpenPGP digital signature

Reply via email to