blob: febaed4a82678c9a664390ec831801e29246b97b (
plain)
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
|
---
# test file for docker.ubuntu role on vagrant
- hosts: ubuntu-1604
become: yes
gather_facts: no
tasks:
- name: Install python
raw: export DEBIAN_FRONTEND=noninteractive && apt-get -y install python python-simplejson
- hosts: all
become: yes
vars:
docker_group_members:
- "{{ ansible_user }}"
roles:
- role: docker.ubuntu
kernel_update_and_reboot_permitted: yes
tasks:
- name: Create a dummy container
docker_container:
name: foobar
pull: true
image: busybox
state: started
when: _pip_install_docker or pip_install_docker_compose
register: container_creation
- name: Remove the dummy container
docker_container:
name: foobar
state: absent
when: container_creation.changed
- name: Remove the dummy image
docker_image:
name: busybox
state: absent
when: container_creation.changed
|