Files
ansible-freeipa/tests/user/test_users_absent.yml
Thomas Woerner 545d1c7422 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.
2021-08-11 11:24:36 +02:00

25 lines
557 B
YAML

---
- name: Include create_users_json.yml
import_playbook: create_users_json.yml
- name: Test users absent
hosts: ipaserver
become: true
gather_facts: false
tasks:
- name: Include users.json
include_vars:
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 }}
ipauser:
ipaadmin_password: SomeADMINpassword
users: "{{ user_names }}"
state: absent