Skip to content

Commit

Permalink
fix: pin ansible collection versions (#766)
Browse files Browse the repository at this point in the history
* fix: pin ansible collection versions

* fix: use ansible collection from devkit container image
  • Loading branch information
Shalin Patel authored Mar 30, 2023
1 parent cb1e574 commit a49707d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
10 changes: 1 addition & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ RUN apk add --no-cache \
py3-wheel \
&& pip3 install --no-cache-dir --requirement /tmp/requirements.txt \
&& rm -rf /root/.cache
# Managing the below ansible dependencies is covered in docs/dev/ansible-modules.md
RUN mkdir -p /usr/share/ansible/collections \
&& ansible-galaxy \
collection install \
community.general \
ansible.netcommon \
ansible.posix \
ansible.utils \
-p /usr/share/ansible/collections

ARG BUILDARCH
# we copy this to remote hosts to execute GOSS
Expand All @@ -45,6 +36,7 @@ COPY --from=devkit /usr/local/bin/packer-${BUILDARCH} /usr/local/bin/packer
COPY --from=devkit /usr/local/bin/packer-provisioner-goss-${BUILDARCH} /usr/local/bin/packer-provisioner-goss
COPY --from=devkit /usr/local/bin/govc /usr/local/bin/
COPY --from=devkit /root/.config/packer/plugins/ ${PACKER_PLUGIN_PATH}
COPY --from=devkit /usr/share/ansible/collections/ansible_collections/ /usr/share/ansible/collections/ansible_collections/
COPY bin/konvoy-image-${BUILDARCH} /usr/local/bin/konvoy-image
COPY images /root/images
COPY ansible /root/ansible
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.devkit
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ RUN apk add --no-cache \
RUN mkdir -p /usr/share/ansible/collections \
&& ansible-galaxy \
collection install \
community.general \
ansible.netcommon \
ansible.posix \
ansible.utils \
community.general:==6.4.0 \
ansible.netcommon:==5.0.0 \
ansible.posix:==1.5.1 \
ansible.utils:==2.9.0 \
-p /usr/share/ansible/collections

# hadolint ignore=DL4006
Expand Down

0 comments on commit a49707d

Please sign in to comment.