summaryrefslogtreecommitdiffstats
path: root/tests/roles/prepare-env/tasks/main.yml
blob: bc467948e95a718ac68ab34aa1f81f725e7e631d (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
40
41
---
- name: install required packages for testings
  package:
    name: "{{ item }}"
    state: latest
  with_items:
    - docker
    - python-docker-py
    - buildah
    - docker-distribution
    - ostree
    - httpd 
    - libselinux-python

- 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

- name: creates directory buildah testing
  file: path=/tmp/buildah/bud state=directory

- name: download Dockerfile 
  get_url:
    url: https://github.com/fedora-cloud/Fedora-Dockerfiles/raw/master/nginx/Dockerfile
    dest: /tmp/buildah/bud/Dockerfile

- name: creates a bud directory in /var/www/html
  file: path=/var/www/html/bud state=directory

- name: archive dockerfile into httpd directory
  command: tar zcvf /var/www/html/bud/Dockerfile.tar.gz Dockerfile
  args:
    chdir: /tmp/buildah/bud

- name: start httpd service
  systemd: state=started name=httpd