diff --git a/linux/ansible/ansible b/linux/ansible/ansible deleted file mode 100644 index 634d3f28..00000000 --- a/linux/ansible/ansible +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -if [ -z "$MSI_ENDPOINT" ]; then - export ANSIBLE_AZURE_AUTH_SOURCE='cli' -else - export ANSIBLE_AZURE_AUTH_SOURCE='msi' -fi - -source /opt/ansible/bin/activate -ansible "$@" -deactivate diff --git a/linux/ansible/ansible-config b/linux/ansible/ansible-config deleted file mode 100644 index 71fa7602..00000000 --- a/linux/ansible/ansible-config +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -if [ -z "$MSI_ENDPOINT" ]; then - export ANSIBLE_AZURE_AUTH_SOURCE='cli' -else - export ANSIBLE_AZURE_AUTH_SOURCE='msi' -fi - -source /opt/ansible/bin/activate -ansible-config "$@" -deactivate diff --git a/linux/ansible/ansible-connection b/linux/ansible/ansible-connection deleted file mode 100644 index b4d78a7a..00000000 --- a/linux/ansible/ansible-connection +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -if [ -z "$MSI_ENDPOINT" ]; then - export ANSIBLE_AZURE_AUTH_SOURCE='cli' -else - export ANSIBLE_AZURE_AUTH_SOURCE='msi' -fi - -source /opt/ansible/bin/activate -ansible-connection "$@" -deactivate diff --git a/linux/ansible/ansible-console b/linux/ansible/ansible-console deleted file mode 100644 index d0230f28..00000000 --- a/linux/ansible/ansible-console +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -if [ -z "$MSI_ENDPOINT" ]; then - export ANSIBLE_AZURE_AUTH_SOURCE='cli' -else - export ANSIBLE_AZURE_AUTH_SOURCE='msi' -fi - -source /opt/ansible/bin/activate -ansible-console "$@" -deactivate diff --git a/linux/ansible/ansible-doc b/linux/ansible/ansible-doc deleted file mode 100644 index 5e4204eb..00000000 --- a/linux/ansible/ansible-doc +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -if [ -z "$MSI_ENDPOINT" ]; then - export ANSIBLE_AZURE_AUTH_SOURCE='cli' -else - export ANSIBLE_AZURE_AUTH_SOURCE='msi' -fi - -source /opt/ansible/bin/activate -ansible-doc "$@" -deactivate diff --git a/linux/ansible/ansible-galaxy b/linux/ansible/ansible-galaxy deleted file mode 100644 index 5c8b7860..00000000 --- a/linux/ansible/ansible-galaxy +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -if [ -z "$MSI_ENDPOINT" ]; then - export ANSIBLE_AZURE_AUTH_SOURCE='cli' -else - export ANSIBLE_AZURE_AUTH_SOURCE='msi' -fi - -source /opt/ansible/bin/activate -ansible-galaxy "$@" -deactivate diff --git a/linux/ansible/ansible-inventory b/linux/ansible/ansible-inventory deleted file mode 100644 index 94b7490a..00000000 --- a/linux/ansible/ansible-inventory +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -if [ -z "$MSI_ENDPOINT" ]; then - export ANSIBLE_AZURE_AUTH_SOURCE='cli' -else - export ANSIBLE_AZURE_AUTH_SOURCE='msi' -fi - -source /opt/ansible/bin/activate -ansible-inventory "$@" -deactivate diff --git a/linux/ansible/ansible-playbook b/linux/ansible/ansible-playbook deleted file mode 100644 index 5c460b72..00000000 --- a/linux/ansible/ansible-playbook +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -if [ -z "$MSI_ENDPOINT" ]; then - export ANSIBLE_AZURE_AUTH_SOURCE='cli' -else - export ANSIBLE_AZURE_AUTH_SOURCE='msi' -fi - -source /opt/ansible/bin/activate -ansible-playbook "$@" -deactivate diff --git a/linux/ansible/ansible-pull b/linux/ansible/ansible-pull deleted file mode 100644 index 21c05ee9..00000000 --- a/linux/ansible/ansible-pull +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -if [ -z "$MSI_ENDPOINT" ]; then - export ANSIBLE_AZURE_AUTH_SOURCE='cli' -else - export ANSIBLE_AZURE_AUTH_SOURCE='msi' -fi - -source /opt/ansible/bin/activate -ansible-pull "$@" -deactivate diff --git a/linux/ansible/ansible-vault b/linux/ansible/ansible-vault deleted file mode 100644 index cda6729a..00000000 --- a/linux/ansible/ansible-vault +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -if [ -z "$MSI_ENDPOINT" ]; then - export ANSIBLE_AZURE_AUTH_SOURCE='cli' -else - export ANSIBLE_AZURE_AUTH_SOURCE='msi' -fi - -source /opt/ansible/bin/activate -ansible-vault "$@" -deactivate diff --git a/linux/base.Dockerfile b/linux/base.Dockerfile index ae15a138..ff53b54c 100644 --- a/linux/base.Dockerfile +++ b/linux/base.Dockerfile @@ -1,5 +1,5 @@ -# base.Dockerfile contains components which are large and change less frequently. -# tools.Dockerfile contains the smaller, more frequently-updated components. +# base.Dockerfile contains components which are large and change less frequently. +# tools.Dockerfile contains the smaller, more frequently-updated components. # Within Azure, the image layers # built from this file are cached in a number of locations to speed up container startup time. A manual @@ -38,7 +38,6 @@ RUN bash ./tdnfinstall.sh \ gpgme \ gnupg2 \ autoconf \ - ansible \ bash-completion \ build-essential \ binutils \ @@ -193,15 +192,6 @@ RUN curl -fSsL `curl -fSsL https://api.github.com/repos/Azure/batch-shipyard/rel && /bin/bash -c "source cloudshell/bin/activate && python3 -m compileall -f /opt/batch-shipyard/shipyard.py /opt/batch-shipyard/convoy && deactivate" \ && ln -sf /opt/batch-shipyard/shipyard /usr/local/bin/shipyard -# # BEGIN: Install Ansible in isolated Virtual Environment -COPY ./linux/ansible/ansible* /usr/local/bin/ -RUN chmod 755 /usr/local/bin/ansible* \ - && pip3 install virtualenv \ - && cd /opt \ - && virtualenv -p python3 ansible \ - && /bin/bash -c "source ansible/bin/activate && pip3 install ansible && pip3 install pywinrm\>\=0\.2\.2 && deactivate" \ - && ansible-galaxy collection install azure.azcollection --force -p /usr/share/ansible/collections - # Install latest version of Istio ENV ISTIO_ROOT /usr/local/istio-latest RUN curl -sSL https://git.io/getLatestIstio | sh - \ diff --git a/linux/tools.Dockerfile b/linux/tools.Dockerfile index 11491592..5674cd95 100644 --- a/linux/tools.Dockerfile +++ b/linux/tools.Dockerfile @@ -21,8 +21,8 @@ RUN wget https://azurecliprod.blob.core.windows.net/cloudshell-release/azure-cli # Install any Azure CLI extensions that should be included by default. RUN az extension add --system --name ai-examples -y \ -&& az extension add --system --name ssh -y \ -&& az extension add --system --name ml -y + && az extension add --system --name ssh -y \ + && az extension add --system --name ml -y # Install kubectl RUN az aks install-cli \ @@ -48,14 +48,9 @@ RUN npm install -q -g @pnp/cli-microsoft365 # Install Bicep CLI RUN curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64 \ - && chmod +x ./bicep \ - && mv ./bicep /usr/local/bin/bicep \ - && bicep --help - -# Temp: fix ansible modules. Proper fix is to update base layer to use regular python for Ansible. -RUN mkdir -p /usr/share/ansible/collections/ansible_collections/azure/azcollection/ \ - && wget -nv -q -O /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements-azure.txt https://raw.githubusercontent.com/ansible-collections/azure/dev/requirements-azure.txt \ - && /opt/ansible/bin/python -m pip install -r /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements-azure.txt + && chmod +x ./bicep \ + && mv ./bicep /usr/local/bin/bicep \ + && bicep --help # Copy and run script to Install powershell modules and setup Powershell machine profile COPY ./linux/powershell/PSCloudShellUtility/ /usr/local/share/powershell/Modules/PSCloudShellUtility/