blob: 6563ab276dd184b2326ae2d86eb001bbef40a7ff [file] [log] [blame]
Andy Bavier175cfaf2017-03-13 18:09:21 -04001---
2# build-images/tasks/main.yml
3
4- name: Clean up chameleon temp directory
5 file:
6 path: "{{ cord_dir }}/orchestration/xos/containers/chameleon/tmp.chameleon"
7 state: absent
8 with_items: "{{ chameleon_dirs }}"
9
10- name: Populate chameleon temp directory
11 shell: cp -a "{{ cord_dir }}/component/chameleon" "{{ item }}"
12 with_items: "{{ chameleon_dirs }}"
13 tags:
14 - skip_ansible_lint # docker can't access files outside of build context, so we must copy
15
16# If an image was previously pulled it won't get built
17- name: Build images
18 docker_image:
19 name: "{{ item.name }}"
20 path: "{{ item.path }}"
21 tag: "{{ build_docker_tag }}"
22 dockerfile: "{{ item.dockerfile }}"
23 pull: False
24 with_items: "{{ docker_images }}"
25
26- name: Build optional images
27 docker_image:
28 name: "{{ item.name }}"
29 path: "{{ item.path }}"
30 tag: "{{ build_docker_tag }}"
31 dockerfile: "{{ item.dockerfile }}"
32 pull: False
33 with_items: "{{ docker_optional_images }}"
34 when: build_optional_images
35
36# Build extensions images
37- name: Build xos-gui-extensions docker images
38 docker_image:
39 name: "xosproject/gui-extension-{{ item.name }}"
40 path: "{{ cord_dir }}/{{ item.path }}"
41 tag: "{{ build_docker_tag }}"
42 pull: False
43 with_items: "{{ enabled_gui_extensions }}"