diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/common.sh b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/common.sh index 3b252f6df0..f115e98eae 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/common.sh +++ b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/common.sh @@ -41,14 +41,14 @@ download_image() { local dst_image="${dest_dir}/${repo_basename}-${tag}.tar" #[[ ! -f $dst_image ]] || remove_file "$dst_image" - if [[ -f $dst_image ]]; then - echo "Image: "$dst_image" already exists. Skipping..." + if [[ -f ${dst_image} ]]; then + echo "Image: "${dst_image}" already exists. Skipping..." else local tmp_file=$(mktemp) echo "Downloading image: $1" - echo "Skopeo command is: ./skopeo_linux --insecure-policy copy docker://$image_name docker-archive:$dst_image:$repository:$tag" + echo "Skopeo command is: ./skopeo_linux --insecure-policy copy docker://{$image_name} docker-archive:${dst_image}:${repository}:${tag}" # use temporary file for downloading to be safe from sudden interruptions (network, ctrl+c) - ./skopeo_linux --insecure-policy copy docker://$image_name docker-archive:$tmp_file:$repository:$tag && mv $tmp_file $dst_image + ./skopeo_linux --insecure-policy copy docker://${image_name} docker-archive:${tmp_file}:${repository}:${tag} && chmod 644 ${tmp_file} && mv ${tmp_file} ${dst_image} fi } diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/download-requirements.sh b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/download-requirements.sh index 99d7389d14..7690b5f5d1 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/download-requirements.sh +++ b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/download-requirements.sh @@ -2,9 +2,6 @@ set -euo pipefail -# source common functions -. common.sh - if [[ $# -lt 1 ]]; then usage exit @@ -31,8 +28,11 @@ deplist_cmd() { apt-cache depends --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends $1 } +# source common functions +. "${script_path}/common.sh" + # install prerequisites which might be missing -apt install wget gpg +apt install -y wget gpg # some quick sanity check echo "dependency list: ${deplist}" diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/requirements.txt b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/requirements.txt index 34194acd40..02fa7b7ec9 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/requirements.txt +++ b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/requirements.txt @@ -94,6 +94,9 @@ apache2 apache2-bin apache2-utils +# for jq +libjq1 + [files] https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.12.0/jmx_prometheus_javaagent-0.12.0.jar https://archive.apache.org/dist/kafka/2.0.0/kafka_2.12-2.0.0.tgz