Skip to content
test_users_absent.yml 626 B
Newer Older
- name: Include create_users_json.yml
  ansible.builtin.import_playbook: create_users_json.yml
- name: Test users absent
  hosts: ipaserver
  become: true
  gather_facts: false

  tasks:
  - name: Include users.json
    ansible.builtin.include_vars:
      file: users.json  # noqa missing-import
  - name: Create dict with user names
    ansible.builtin.set_fact:
      user_names: "{{ user_names | default([]) + [{'name': item.name}] }}"
  - name: Users absent len:{{ users | length }}
    ipauser:
      ipaadmin_password: SomeADMINpassword
      users: "{{ user_names }}"
      state: absent