blob: a1296b1753e2db41b94d42245817de598aaeaa28 [file] [log] [blame]
Fatih Degirmenci20d34e72020-05-19 08:13:26 +00001---
2# ============LICENSE_START=======================================================
3# Copyright (C) 2019 The Nordix Foundation. All rights reserved.
4# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# SPDX-License-Identifier: Apache-2.0
18# ============LICENSE_END=========================================================
19
20- name: Prepare packaging
21 include_tasks: prepare-packaging.yaml
22
23- name: Create folder to store dependencies for offline deployment
24 file:
25 path: "{{ offline_pkg_folder }}"
26 state: "{{ item }}"
27 with_items:
28 - absent
29 - directory
30
31- name: Install packages on {{ ansible_os_family }}
32 include_tasks: "install-packages-{{ ansible_os_family }}.yml"
33
34# TODO (fdegir): we need to switch to build with dib here
35- name: Fetch operating system images for provisioning
36 include_tasks: dib.yaml
37
38# collect apt packages
39- name: Fetch operating system packages
40 include_tasks: "pkg-{{ ansible_os_family }}.yaml"
41
42# clone git repositories
43- name: Fetch git repositories
44 include_tasks: git.yaml
45
46# download binaries
47- name: Fetch binaries
48 include_tasks: binaries.yaml
49
50# download pip packages
51- name: Fetch pip python packages
52 include_tasks: pip.yaml
53
54# fetch k8s container images
55- name: Fetch container images
56 include_tasks: containers.yaml
57
58# ensure we don't have leftovers
59- name: Delete outdated files
60 file:
61 path: "{{ item }}"
62 state: absent
63 with_items:
64 - "{{ offline_pkg_file }}"
65 - "{{ offline_pkg_folder }}/install.sh"
66 - "{{ offline_installer_file }}"
67 - "/tmp/decompress.sh"
68
69- name: Copy decompress and install scripts
70 copy:
71 src: "{{ item.src }}"
72 dest: "{{ item.dest }}"
73 mode: 0755
74 with_items:
75 - {src: "install.sh", dest: "{{ offline_pkg_folder }}/install.sh"}
76 - {src: "decompress.sh", dest: "/tmp/decompress.sh"}
77
78# create tarball
79- name: Create engine installer file
80 script: build.sh
81 register: build_script
82
83- name: Log build script output to console
84 debug:
85 msg: "{{ build_script.stdout_lines }}"
86
87# vim: set ts=2 sw=2 expandtab: