Debian Codegraph @

ansible_collections/community/docker/tests/integration/targets/docker_plugin/tasks/main.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 - name: Create random name prefix
7 ansible.builtin.set_fact:
8 name_prefix: "vieux/sshfs"
9 plugin_names: []
10
11 - ansible.builtin.debug:
12 msg: "Using name prefix {{ name_prefix }}"
13
14 - name: Check whether /dev/fuse exists
15 ansible.builtin.stat:
16 path: /dev/fuse
17 register: dev_fuse_stat
18
19 - block:
20 - ansible.builtin.include_tasks: run-test.yml
21 with_fileglob:
22 - "tests/*.yml"
23 loop_control:
24 loop_var: test_name
25
26 always:
27 - name: "Make sure plugin is removed"
28 community.docker.docker_plugin:
29 plugin_name: "{{ item }}"
30 state: absent
31 with_items: "{{ plugin_names }}"
32
33 when: docker_api_version is version('1.25', '>=') and dev_fuse_stat.stat.exists
34
35 - ansible.builtin.fail: msg="Too old docker / docker-py version to run docker_plugin tests!"
36 when: not(docker_api_version is version('1.25', '>=')) and (ansible_facts.distribution != 'CentOS' or ansible_facts.distribution_major_version|int > 6)