summaryrefslogtreecommitdiffstats
path: root/tests/roles/cli/tasks/add.yaml
blob: 94ad7164cf1f326b06a0ebdaee1ff382bd6c8ca8 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
- name: buildah add
  command: buildah add nginxc /tmp/buildah/bud/Dockerfile

- name: check buildah add
  command: ls {{mount.stdout}}/Dockerfile

- name: buildah add to destination
  command: buildah add nginxc /tmp/buildah/bud/Dockerfile /home

- name: check buildah add to
  command: ls {{mount.stdout}}/home/Dockerfile

- name: buildah add URL
  command: buildah add nginxc https://github.com/projectatomic/buildah/raw/master/README.md

- name: check buildah add URL
  command: ls {{mount.stdout}}/README.md

- name: buildah add URL to destination
  command: buildah add nginxc https://github.com/projectatomic/buildah/raw/master/README.md /home

- name: check buildah add URL to destination
  command: ls {{mount.stdout}}/home/README.md

- name: create /tmp/buildah/addcopy
  file: path=/tmp/buildah/addcopy state=directory

- name: Download buildah README.md
  get_url:
    url: https://github.com/projectatomic/buildah/raw/master/README.md
    dest: /tmp/buildah/addcopy/

- name: buildah add dir
  command: buildah add nginxc /tmp/buildah

- name: check buildah add dir
  command: ls {{mount.stdout}}/addcopy/README.md

- name: buildah add dir to destination
  command: buildah add nginxc /tmp/buildah /home

- name: check buildah add dir to destination
  command: ls {{mount.stdout}}/home/addcopy/README.md

- name: buildah add a tarball file
  command: buildah add nginxc /var/www/html/bud/Dockerfile.tar.gz /home

- name: check buildah has added content of tarball to container
  command: ls {{mount.stdout}}/home/hello

- name: buildah add with option chown
  command: buildah add --chown bin:bin nginxc /tmp/buildah/bud /home

- name: check user after add with option chown
  raw: buildah run nginxc -- ls -l /home/hello
  register: ast
  failed_when: '"bin" not in ast.stdout'