# do until where the until is a json property

**URL:** <https://forum.ansible.com/t/do-until-where-the-until-is-a-json-property/19425>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [October 3, 2015, 7:11am UTC](https://forum.ansible.com/t/do-until-where-the-until-is-a-json-property/19425 "2015-10-03T07:11:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Southgate](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Robin\_Southgate](https://forum.ansible.com/u/Robin_Southgate)\
**Post date:** [October 3, 2015, 7:11am UTC](https://forum.ansible.com/t/do-until-where-the-until-is-a-json-property/19425/1 "2015-10-03T07:11:29Z")

</div>

Hi,  
I’d like to do something like the following:

`

- name: Wait for Security Group to be applied  
command: “aws rds describe-db-instances --db-instance-identifier {{ target\_db\_environment }}-mysql-db-{{ current\_time }} --output json”  
register: db\_info  
set\_fact:  
security\_group\_json: “{{ db\_info | from\_json }}”  
security\_group: “{{ security\_group\_json.DBInstances[0].VpcSecurityGroups[0].VpcSecurityGroupId }}”  
security\_group\_active: “{{ security\_group\_json.DBInstances[0].VpcSecurityGroups[0].Status }}”  
until: “{{ security\_group }} == ‘sg-XXXXXXXX’ && {{ security\_group\_active }} == ‘Active’”  
retries: 5  
delay: 5  
`

But I can’t mix the set\_fact in there like that. Is there any way, within the register two properties of the returned json? Otherwise is my only option a regex in the until that looks for both the security group and the Status=Active?
