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?
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/c629c1c7-d3ae-4fd7-8ae1-550ba890850c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.