mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
Use Fully Qualified Collection Name (FQCN) for ansible builtins. This is ansible.builtin.set_fact instead of set_fact for example and aplies for all actions that are part of ansible.builtin. All the replaced ansible.builtins: assert, command, copy, debug, fail, fetch, file, import_playbook, import_tasks, include_role, include_tasks, include_vars, package, set_fact, shell, slurp, stat, systemd
75 lines
1.6 KiB
YAML
75 lines
1.6 KiB
YAML
---
|
|
# Tasks executed to clean up test environment for Vault module.
|
|
- name: Ensure user vaults are absent
|
|
ipavault:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name:
|
|
- stdvault
|
|
- symvault
|
|
- asymvault
|
|
username: "{{ username }}"
|
|
state: absent
|
|
loop:
|
|
- admin
|
|
- user01
|
|
loop_control:
|
|
loop_var: username
|
|
|
|
- name: Ensure shared vaults are absent
|
|
ipavault:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name:
|
|
- sharedvault
|
|
- svcvault
|
|
state: absent
|
|
|
|
- name: Ensure test users do not exist.
|
|
ipauser:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name:
|
|
- user01
|
|
- user02
|
|
- user03
|
|
state: absent
|
|
|
|
- name: Ensure test groups do not exist.
|
|
ipagroup:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name: vaultgroup
|
|
state: absent
|
|
|
|
- name: Remove files from target host.
|
|
ansible.builtin.file:
|
|
path: "{{ ansible_facts['env'].HOME }}/{{ item }}"
|
|
state: absent
|
|
with_items:
|
|
- A_private.pem
|
|
- A_public.pem
|
|
- B_private.pem
|
|
- B_public.pem
|
|
- A_private.b64
|
|
- A_public.b64
|
|
- B_private.b64
|
|
- B_public.b64
|
|
- password.txt
|
|
- in.txt
|
|
- out.txt
|
|
|
|
- name: Remove files from controller.
|
|
ansible.builtin.file:
|
|
path: "{{ playbook_dir }}/{{ item }}"
|
|
state: absent
|
|
delegate_to: localhost
|
|
become: no
|
|
with_items:
|
|
- A_private.pem
|
|
- A_public.pem
|
|
- B_private.pem
|
|
- B_public.pem
|
|
- A_private.b64
|
|
- A_public.b64
|
|
- B_private.b64
|
|
- B_public.b64
|