Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# 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
name:
- user01
- user02
- user03
state: absent
- name: Ensure test groups do not exist.
ipagroup:
ipaadmin_password: SomeADMINpassword
name: vaultgroup
state: absent
- name: Remove password file from target host.
file:
path: "{{ ansible_env.HOME }}/password.txt"
state: absent
- name: Remove public key file from target host.
file:
path: "{{ ansible_env.HOME }}/public.pem"
state: absent
- name: Remove private key file from target host.
file:
path: "{{ ansible_env.HOME }}/private.pem"
state: absent
- name: Remove output data file from target host.
file:
path: "{{ ansible_env.HOME }}/data.txt"
state: absent
- name: Remove input data file from target host.
file:
path: "{{ ansible_env.HOME }}/in.txt"
state: absent
- name: Remove private/public key files.
shell:
cmd: rm -f private.pem public.pem
delegate_to: localhost
become: no
args:
warn: no # suppres warning for not using the `file` module.