bdba4f65634a9fdd1fafa646402b7b60bd6381d2
[csit.git] / resources / tools / testbed-setup / ansible / roles / csit_shim_image / tasks / main.yaml
1 ---
2 # file: roles/csit_shim_image/tasks/main.yaml
3
4 - name: Create a directory if it does not exist
5   file:
6     path: "{{ item }}"
7     state: "directory"
8     mode: 0755
9   with_items:
10     - "/opt/csit-shim/"
11     - "/opt/csit-shim/files"
12   tags: csit-shim-image
13
14 - name: Copy Build Items
15   copy:
16     src: "{{ item }}"
17     dest: "/opt/csit-shim/{{ item }}"
18     owner: "root"
19     group: "root"
20     mode: 0655
21   with_items:
22     - "Dockerfile"
23     - "files/badkeypub"
24     - "files/sshconfig"
25     - "files/wrapdocker"
26   tags: csit-shim-image
27
28 - name: Build CSIT shim Docker Image
29   shell: "docker build -t csit_shim-ubuntu1804:local ."
30   args:
31     chdir: "/opt/csit-shim"
32   tags: csit-shim-image