2018-04-08 03:03:14 +00:00
|
|
|
---
|
|
|
|
- name: install required packages for testings
|
|
|
|
package:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: latest
|
|
|
|
with_items:
|
|
|
|
- docker
|
|
|
|
- python-docker-py
|
|
|
|
- buildah
|
|
|
|
- docker-distribution
|
|
|
|
- ostree
|
|
|
|
- httpd
|
|
|
|
- libselinux-python
|
2018-04-18 13:26:10 +00:00
|
|
|
- golang
|
|
|
|
- make
|
|
|
|
- libseccomp-devel
|
2018-04-08 03:03:14 +00:00
|
|
|
|
|
|
|
- name: start docker daemon
|
|
|
|
systemd: state=started name=docker
|
|
|
|
|
|
|
|
- name: create /ostree/repo
|
|
|
|
file: path=/ostree/repo state=directory
|
|
|
|
|
|
|
|
- name: ensure docker-distribution service is running
|
|
|
|
systemd: state=started name=docker-distribution
|
|
|
|
|
2018-04-18 13:26:10 +00:00
|
|
|
- name: create tmp directory for buildah testing
|
2018-04-08 03:03:14 +00:00
|
|
|
file: path=/tmp/buildah/bud state=directory
|
|
|
|
|
2018-04-18 13:26:10 +00:00
|
|
|
- name: download Dockerfile for hello-world from github
|
2018-04-08 03:03:14 +00:00
|
|
|
get_url:
|
2018-04-18 13:26:10 +00:00
|
|
|
url: https://raw.githubusercontent.com/docker-library/hello-world/master/amd64/hello-world/Dockerfile
|
2018-04-08 03:03:14 +00:00
|
|
|
dest: /tmp/buildah/bud/Dockerfile
|
2018-04-18 13:26:10 +00:00
|
|
|
force: yes
|
2018-04-08 03:03:14 +00:00
|
|
|
|
2018-04-18 13:26:10 +00:00
|
|
|
- name: download hello for the Dockerfile
|
|
|
|
get_url:
|
|
|
|
url: https://github.com/docker-library/hello-world/raw/master/amd64/hello-world/hello
|
|
|
|
dest: /tmp/buildah/bud/hello
|
|
|
|
force: yes
|
|
|
|
mode: 0755
|
|
|
|
|
|
|
|
- name: create a bud directory in /var/www/html
|
2018-04-08 03:03:14 +00:00
|
|
|
file: path=/var/www/html/bud state=directory
|
|
|
|
|
|
|
|
- name: archive dockerfile into httpd directory
|
2018-04-18 13:26:10 +00:00
|
|
|
command: tar zcvf /var/www/html/bud/Dockerfile.tar.gz Dockerfile hello
|
2018-04-08 03:03:14 +00:00
|
|
|
args:
|
|
|
|
chdir: /tmp/buildah/bud
|
2018-04-18 13:26:10 +00:00
|
|
|
# Disables the following warning:
|
|
|
|
# Consider using unarchive module rather than running tar
|
|
|
|
warn: no
|
2018-04-08 03:03:14 +00:00
|
|
|
|
|
|
|
- name: start httpd service
|
|
|
|
systemd: state=started name=httpd
|