Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/setup_docker/tasks/main.yml

raw
1 ---
2 ####################################################################
3 # WARNING: These are designed specifically for Ansible tests #
4 # and should not be used as examples of how to write Ansible roles #
5 ####################################################################
6
7 # Copyright (c) Ansible Project
8 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
9 # SPDX-License-Identifier: GPL-3.0-or-later
10
11 - name: Print information on which we distinguish
12 debug:
13 msg: "Distribution '{{ ansible_facts.distribution }}', version '{{ ansible_facts.distribution_version }}', OS family '{{ ansible_facts.os_family }}'"
14
15 - name: Distribution specific
16 block:
17 - name: Include distribution specific vars
18 include_vars: "{{ lookup('first_found', params) }}"
19 vars:
20 params:
21 files: "{{ distro_lookup_names }}"
22 paths:
23 - "{{ role_path }}/vars"
24 - name: Include distribution specific tasks
25 include_tasks: "{{ lookup('first_found', params) }}"
26 vars:
27 params:
28 files: "{{ distro_lookup_names }}"
29 paths:
30 - "{{ role_path }}/tasks"
31
32 - name: Start docker service
33 become: true
34 ansible.builtin.service:
35 name: docker
36 state: started
37 notify: Stop docker service
38
39 - name: Cheat on the docker socket permissions
40 become: true
41 ansible.builtin.file:
42 path: /var/run/docker.sock
43 mode: "0666"
44
45 - name: Install python "requests"
46 ansible.builtin.pip:
47 name:
48 - requests
49 state: present
50 notify: Remove python requests