[PR #599/81ab18d backport][stable-2] chore[CI]: fix conditional statements should not include jinja 2 templating (#601)

* chore: fix conditional statements should not include jinja 2 templating (#599)

Thanks to @tompal3 for your contribution

(cherry picked from commit 81ab18d56c)

* fix query for stable-2
This commit is contained in:
Laurent Indermühle 2023-11-30 16:41:34 +01:00 committed by GitHub
commit 368c9b4b65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 87 additions and 45 deletions

View file

@ -99,8 +99,8 @@
- name: Assert grant access for user1 on multiple database
assert:
that:
- "'{{ item }}' in result.stdout"
with_items: "{{ db_names }}"
- item in result.stdout
loop: "{{ db_names }}"
- name: Show grants access for user2 on multiple database
command: "{{ mysql_command }} -e \"SHOW GRANTS FOR '{{ user_name_2 }}'@'localhost'\""
@ -109,8 +109,8 @@
- name: Assert grant access for user2 on multiple database
assert:
that:
- "'{{ item }}' in result.stdout"
with_items: "{{db_names}}"
- item in result.stdout
loop: "{{db_names}}"
- include: utils/remove_user.yml user_name={{ user_name_1 }}