Rebase install source/migrate to latest ansible
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Danny Bessems 2021-05-27 12:57:22 +02:00
parent 63353f23c6
commit 7a3e42c581

View File

@ -12,19 +12,12 @@ ADD https://${REPO_USERNAME}:${REPO_PASSWORD}@sn.itch.fyi/Repository/bin/VMware/
RUN apk --update add --no-cache \ RUN apk --update add --no-cache \
curl \ curl \
jq && \
curl -L https://api.github.com/repos/rgl/packer-provisioner-windows-update/releases/latest | \
jq -r '.assets[] | select(.name | contains("linux_amd64")) | .browser_download_url' | \
xargs -I {} curl -L -o /tmp/packer-provisioner-windows-update.tar.gz {} && \
tar -xzf /tmp/packer-provisioner-windows-update.tar.gz -C /tmp && \
chmod +x /tmp/packer-provisioner-windows-update && \
curl -L https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -o /tmp/packages-microsoft-prod.deb curl -L https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -o /tmp/packages-microsoft-prod.deb
FROM ruby:slim FROM ruby:slim
COPY --from=packer /bin/packer /bin/packer COPY --from=packer /bin/packer /bin/packer
COPY --from=terraform /bin/terraform /bin/terraform COPY --from=terraform /bin/terraform /bin/terraform
COPY --from=download /tmp/packer-provisioner-windows-update /bin/packer-provisioner-windows-update
COPY --from=download /tmp/packages-microsoft-prod.deb /tmp/packages-microsoft-prod.deb COPY --from=download /tmp/packages-microsoft-prod.deb /tmp/packages-microsoft-prod.deb
COPY --from=download /tmp/ovftool-installer /tmp/ovftool-installer COPY --from=download /tmp/ovftool-installer /tmp/ovftool-installer
@ -35,24 +28,28 @@ ENV LC_ALL en_US.UTF-8
RUN dpkg -i /tmp/packages-microsoft-prod.deb && \ RUN dpkg -i /tmp/packages-microsoft-prod.deb && \
rm -f /tmp/packages-microsoft-prod.deb && \ rm -f /tmp/packages-microsoft-prod.deb && \
apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \ apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
# (build-essential) Dependency for installation of InSpec
build-essential \ build-essential \
curl \ curl \
git \ git \
gnupg \ # gnupg \
jq \ jq \
# (locales) Dependency for InSpec
locales \ locales \
netcat-openbsd \ netcat-openbsd \
openssh-client \ openssh-client \
powershell \ powershell \
# (python3-*) Dependency for installation of Ansible
python3-pip \
python3-setuptools \
python3-wheel \
yamllint && \ yamllint && \
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" | tee -a /etc/apt/sources.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 && \
apt-get update && apt-get install -y --no-install-recommends \
ansible && \
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen && \ locale-gen && \
curl https://omnitruck.chef.io/install.sh | bash -s -- -P inspec && \ curl https://omnitruck.chef.io/install.sh | bash -s -- -P inspec && \
gem update --system && gem update && \ gem update --system && gem update && \
pip3 install --upgrade pip && \
pip3 install ansible-core && \
pwsh -Command "Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted' -Verbose" && \ pwsh -Command "Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted' -Verbose" && \
pwsh -Command "Install-Module -Name 'powershell-yaml','VMware.PowerCLI' -Verbose" && \ pwsh -Command "Install-Module -Name 'powershell-yaml','VMware.PowerCLI' -Verbose" && \
pwsh -Command "Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP \$False -Confirm:\$False" && \ pwsh -Command "Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP \$False -Confirm:\$False" && \