X-Git-Url: https://gerrit.nordix.org/gitweb?p=infra%2Fstack%2Fkubernetes.git;a=blobdiff_plain;f=playbooks%2Froles%2Fpackage%2Ftasks%2Fmain.yaml;fp=playbooks%2Froles%2Fpackage%2Ftasks%2Fmain.yaml;h=a1296b1753e2db41b94d42245817de598aaeaa28;hp=0000000000000000000000000000000000000000;hb=20d34e772e021fabdee0aa9b50e9804a80d5108a;hpb=0ee637017774692ae73514e146f25c8973c3bffe diff --git a/playbooks/roles/package/tasks/main.yaml b/playbooks/roles/package/tasks/main.yaml new file mode 100644 index 0000000..a1296b1 --- /dev/null +++ b/playbooks/roles/package/tasks/main.yaml @@ -0,0 +1,87 @@ +--- +# ============LICENSE_START======================================================= +# Copyright (C) 2019 The Nordix Foundation. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +- name: Prepare packaging + include_tasks: prepare-packaging.yaml + +- name: Create folder to store dependencies for offline deployment + file: + path: "{{ offline_pkg_folder }}" + state: "{{ item }}" + with_items: + - absent + - directory + +- name: Install packages on {{ ansible_os_family }} + include_tasks: "install-packages-{{ ansible_os_family }}.yml" + +# TODO (fdegir): we need to switch to build with dib here +- name: Fetch operating system images for provisioning + include_tasks: dib.yaml + +# collect apt packages +- name: Fetch operating system packages + include_tasks: "pkg-{{ ansible_os_family }}.yaml" + +# clone git repositories +- name: Fetch git repositories + include_tasks: git.yaml + +# download binaries +- name: Fetch binaries + include_tasks: binaries.yaml + +# download pip packages +- name: Fetch pip python packages + include_tasks: pip.yaml + +# fetch k8s container images +- name: Fetch container images + include_tasks: containers.yaml + +# ensure we don't have leftovers +- name: Delete outdated files + file: + path: "{{ item }}" + state: absent + with_items: + - "{{ offline_pkg_file }}" + - "{{ offline_pkg_folder }}/install.sh" + - "{{ offline_installer_file }}" + - "/tmp/decompress.sh" + +- name: Copy decompress and install scripts + copy: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + mode: 0755 + with_items: + - {src: "install.sh", dest: "{{ offline_pkg_folder }}/install.sh"} + - {src: "decompress.sh", dest: "/tmp/decompress.sh"} + +# create tarball +- name: Create engine installer file + script: build.sh + register: build_script + +- name: Log build script output to console + debug: + msg: "{{ build_script.stdout_lines }}" + +# vim: set ts=2 sw=2 expandtab: