Skip to content
Snippets Groups Projects
Commit 545d1c74 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

Replace json_query in tests/user/test_users_absent.yml

json_query is not part of Ansible Core. As this is the only used module
that is not in Core it has been replaced by constructig a new dict with
the needed user names from users dict using a loop and set_fact.
parent 0a1f289f
No related branches found
No related tags found
No related merge requests found
...@@ -12,8 +12,13 @@ ...@@ -12,8 +12,13 @@
include_vars: include_vars:
file: users.json file: users.json
- name: Create dict with user names
set_fact:
user_names: "{{ user_names | default([]) + [{ 'name': item.name }] }}"
loop: "{{ users }}"
- name: Users absent len:{{ users | length }} - name: Users absent len:{{ users | length }}
ipauser: ipauser:
ipaadmin_password: SomeADMINpassword ipaadmin_password: SomeADMINpassword
users: "{{ users | json_query('[*].{name: name}') }}" users: "{{ user_names }}"
state: absent state: absent
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment