Debian Codegraph @

ansible_collections/containers/podman/tests/integration/targets/podman_logout/tasks/main.yml

raw
1 - name: Test podman_logout
2 block:
3
4 - name: Print podman version
5 command: podman version
6
7 - name: Logout from docker if it exists
8 command: docker logout
9 ignore_errors: true
10
11 - name: Log out with invalid executable
12 containers.podman.podman_logout:
13 executable: podman_invalid
14 register: invalid_executable
15 ignore_errors: true
16
17 - name: Check invalid executable results
18 assert:
19 that:
20 - invalid_executable is failed
21
22 - name: Log out of non-existing registry
23 containers.podman.podman_logout:
24 executable: "{{ test_executable | default('podman') }}"
25 register: non_existing_registry
26
27 - name: Check results
28 assert:
29 that:
30 - "'changed' in non_existing_registry"
31 - "non_existing_registry.changed == False"
32
33 - name: Log out with invalid authfile
34 containers.podman.podman_logout:
35 executable: "{{ test_executable | default('podman') }}"
36 authfile: authfile_invalid.json
37 register: invalid_authfile
38 ignore_errors: true
39
40 - name: Check invalid authfile results
41 assert:
42 that:
43 - invalid_authfile is failed
44
45 - name: Log out of all registries
46 containers.podman.podman_logout:
47 executable: "{{ test_executable | default('podman') }}"
48 all: true
49 register: all_registries
50
51 - name: Check results
52 assert:
53 that:
54 - "'changed' in all_registries"
55 - "all_registries.changed == True"