Skip to content

Commit

Permalink
changed kayobe-build
Browse files Browse the repository at this point in the history
  • Loading branch information
g0rgamesh committed Nov 6, 2023
1 parent 9bf7fdc commit dd40de1
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions docker/kayobe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,20 @@ RUN chmod 600 /stack/.ssh/config
# Copy custom binaries into image. The wildcard worksaround the check on the parent directory existing.
# COPY .automation/utils/kayobe-automation-activate .automation.conf/docker*/kayobe/bin/* /usr/local/bin

# Control host bootsrap without leaving kayobe-config in the image
RUN --mount=type=ssh,uid=1000 --mount=type=tmpfs,target=/tmp/src --mount=type=bind,source=.,target=/src sudo cp -rfp /src /tmp/ && \
sudo chown -Rf stack:stack /tmp/src && \
# Strip the secrets so that we don't need to pass in a vault-password
grep -lR "\$ANSIBLE_VAULT" /tmp/src | xargs rm -f && \
bash /tmp/src/.automation/utils/kayobe-automation-install && \
(rm -f /stack/.ssh/{id_rsa,id_rsa.pub} || true) && \
(mkdir /stack/.ansible || true) && \
(cp -rfp /stack/kayobe-automation-env/src/kayobe-config/etc/kayobe/ansible/roles /stack/.ansible/kayobe-automation-roles || true) && \
(cp -rfp /stack/kayobe-automation-env/src/kayobe-config/etc/kayobe/ansible/collections /stack/.ansible/kayobe-automation-collections || true) && \
rm -rf /stack/kayobe-automation-env/src/kayobe-config

# Symlinking to /src would create a link within the empty directory
RUN sudo rmdir /src || true

ENV ANSIBLE_ROLES_PATH="/stack/.ansible/kayobe-automation-roles:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles"
ENV ANSIBLE_COLLECTIONS_PATH="/stack/.ansible/kayobe-automation-collections:~/.ansible/collections:/usr/share/ansible/collections"
# # Control host bootsrap without leaving kayobe-config in the image
# RUN --mount=type=ssh,uid=1000 --mount=type=tmpfs,target=/tmp/src --mount=type=bind,source=.,target=/src sudo cp -rfp /src /tmp/ && \
# sudo chown -Rf stack:stack /tmp/src && \
# # Strip the secrets so that we don't need to pass in a vault-password
# grep -lR "\$ANSIBLE_VAULT" /tmp/src | xargs rm -f && \
# bash /tmp/src/.automation/utils/kayobe-automation-install && \
# (rm -f /stack/.ssh/{id_rsa,id_rsa.pub} || true) && \
# (mkdir /stack/.ansible || true) && \
# (cp -rfp /stack/kayobe-automation-env/src/kayobe-config/etc/kayobe/ansible/roles /stack/.ansible/kayobe-automation-roles || true) && \
# (cp -rfp /stack/kayobe-automation-env/src/kayobe-config/etc/kayobe/ansible/collections /stack/.ansible/kayobe-automation-collections || true) && \
# rm -rf /stack/kayobe-automation-env/src/kayobe-config

# # Symlinking to /src would create a link within the empty directory
# RUN sudo rmdir /src || true

# ENV ANSIBLE_ROLES_PATH="/stack/.ansible/kayobe-automation-roles:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles"
# ENV ANSIBLE_COLLECTIONS_PATH="/stack/.ansible/kayobe-automation-collections:~/.ansible/collections:/usr/share/ansible/collections"

0 comments on commit dd40de1

Please sign in to comment.