-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeploy.yaml
53 lines (45 loc) · 1.25 KB
/
deploy.yaml
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
# This is a playbook to
# - install and run docker
# - pull Modular Fedora image
# - run a set of tests
- name: Modular Fedora image testing
hosts: localhost
connection: local
become: yes
become_method: sudo
vars:
container_name: "bikeshed_container"
compose: "{{ compose|mandatory }}"
tasks:
- name: install docker
package:
name: docker
state: present
tags: env_setup
- name: start docker service
service:
name: docker
state: started
tags: env_setup
- name: install python-docker-py to use docker_container
package:
name: python-docker-py
state: latest
tags: env_setup
- name: pull a docker image
command: docker pull "{{ compose }}"
ignore_errors: false
tags: pull_image
- name: rename docker image if pulled
command: docker tag "{{ compose }}":latest bikeshed:latest
tags: pull_image
- name: create a data container
docker_container:
name: "{{ container_name }}"
image: bikeshed
state: started
command: sleep infinity
tags: create_container
- include: tests/quick_mini_test.yaml
- include: tests/modules_install.yaml
- include: tests/modules_update.yaml