diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd7822d..ff98671 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ on: env: IMAGE_NAME: sjoshi10/ansible-core LATEST_OS: alpine - LATEST_VERSION: v2.13 + LATEST_VERSION: v2.15 DOCKER_CLI_VERSION: "20.10.14" GOSU_VERSION: "1.14" @@ -82,7 +82,7 @@ jobs: strategy: matrix: os: [alpine, ubuntu] - version: [v2.12, v2.13] + version: [v2.12, v2.13,v2.15] steps: - name: Checkout uses: actions/checkout@v3 diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 8e0681e..66feb58 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -14,7 +14,11 @@ ONBUILD USER root COPY requirements/requirements.txt ./requirements.txt -RUN apk update \ +RUN \ + # Instructions for installing 1password cli: https://developer.1password.com/docs/cli/get-started/ + echo https://downloads.1password.com/linux/alpinelinux/stable/ >> /etc/apk/repositories \ + && wget "https://downloads.1password.com/linux/keys/alpinelinux/support@1password.com-61ddfc31.rsa.pub" -P /etc/apk/keys \ + && apk update \ && apk add --no-cache linux-headers \ build-base \ libffi-dev \ @@ -25,6 +29,8 @@ RUN apk update \ sudo \ tzdata \ cargo \ + rsync \ + 1password-cli \ # install gosu for a better su+exec command (remove sudo if this works) && wget -O /usr/bin/gosu "https://github.com/tianon/gosu/releases/download/$gosu_version/gosu-amd64" \ && chmod +x /usr/bin/gosu \ diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 8e61bdf..5a8922f 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 LABEL org.opencontainers.image.title="haxorof/ansible-core" \ org.opencontainers.image.description="Ansible Core + additions" \ @@ -14,7 +14,17 @@ ONBUILD USER root COPY requirements/requirements.txt ./requirements.txt -RUN apt-get clean \ +RUN \ + apt update \ + && apt -y install \ + curl \ + gnupg \ + # Instructions for installing 1password cli: https://support.1password.com/install-linux/#get-1password-for-linux + && curl -sS https://downloads.1password.com/linux/keys/1password.asc | gpg --dearmor --output /usr/share/keyrings/1password-archive-keyring.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/$(dpkg --print-architecture) stable main" | tee /etc/apt/sources.list.d/1password.list \ + && mkdir -p /etc/debsig/policies/AC2D62742012EA22/ \ + && curl -sS https://downloads.1password.com/linux/debian/debsig/1password.pol | tee /etc/debsig/policies/AC2D62742012EA22/1password.policies \ + && apt-get -y clean \ && apt-get -y update \ && apt-get -y install apt-utils \ && apt-get -y upgrade \ @@ -28,6 +38,8 @@ RUN apt-get clean \ curl \ tzdata \ cargo \ + rsync \ + 1password-cli \ # install gosu for a better su+exec command (remove sudo if this works) && wget -O /usr/bin/gosu "https://github.com/tianon/gosu/releases/download/$gosu_version/gosu-amd64" \ && chmod +x /usr/bin/gosu \ @@ -47,7 +59,7 @@ RUN apt-get clean \ && echo 'ansible-10000 ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/ansible RUN gem install bundler - +RUN pip3 install jmespath WORKDIR /mnt USER ansible-10000 diff --git a/README.md b/README.md index 77c1e7c..2d9fd39 100644 --- a/README.md +++ b/README.md @@ -86,3 +86,4 @@ In a second terminal run the following which will do an Ansible ping to that Pyt ```console # docker run --rm -v /var/run/docker.sock:/var/run/docker.sock haxorof/ansible-core sh -c "echo 'target ansible_connection=docker' > hosts && ansible -m ping -i hosts all" ``` + diff --git a/requirements/v2.15/requirements.txt b/requirements/v2.15/requirements.txt new file mode 100644 index 0000000..6b939ed --- /dev/null +++ b/requirements/v2.15/requirements.txt @@ -0,0 +1 @@ +ansible-core==2.15.3