Remove jinja vars from conditional statements in integration test asserts

This commit is contained in:
Chris Hawk 2024-07-24 16:15:24 -07:00
commit d9d57cbeeb
7 changed files with 14 additions and 14 deletions

View file

@ -56,7 +56,7 @@
- name: Verify that command succeeded
ansible.builtin.assert:
that:
- "\"{{ resource_name }}\" in \"{{ results['resources'] | map(attribute='name') | list }}\""
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: Create a subscription that already exists
google.cloud.gcp_pubsub_subscription:
@ -98,7 +98,7 @@
- name: Verify that command succeeded
ansible.builtin.assert:
that:
- "\"{{ resource_name }}\" not in \"{{ results['resources'] | map(attribute='name') | list }}\""
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: Delete a subscription that does not exist
google.cloud.gcp_pubsub_subscription: