Ansible Version: 2.8.1


I'm trying to get the status of a Kubernetes StatefulSet and wait till it 
has a specific value.

The task looks like this:
- set_fact:
    myVar: "{{ query('k8s', host='myhost.local', ... kind='StatefulSet', 
label_selector='app=test') }}"
  retries: 5
  delay: 30
  until: "myVar[0]['status']['readyReplicas']|int == 3"

The problem I have is, the loop is executed but the "myVar" variable is 
never updated and has it's initial value.

Has anyone seen or tried this? Is there an alternative?


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 view this discussion on the web visit

Reply via email to