Skip to content

Commit

Permalink
Remove poetry & install ansible-pylibssh with pip
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKobayashi committed Feb 12, 2024
1 parent f4d3a61 commit a555190
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
10 changes: 2 additions & 8 deletions yancobat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCH=amd64; elif [ "$TARGETPL
&& addgroup -S ansible && adduser -S ansible -G ansible \
&& mkdir /repo && chown -R ansible /repo \
&& apk --no-cache upgrade \
&& apk add --no-cache ansible-core git yq build-base python3-dev libssh libssh-dev poetry
&& apk add --no-cache py3-pip ansible-core git yq libssh

USER ansible
WORKDIR /ansible
Expand All @@ -33,13 +33,7 @@ COPY --chown=ansible pyproject.toml /ansible/pyproject.toml

RUN ansible-galaxy collection install community.general community.network \
&& ansible-galaxy collection install cisco.ios cisco.iosxr junipernetworks.junos community.routeros vyos.vyos \
&& poetry --no-root install

USER root

RUN apk del build-base python3-dev libssh-dev

USER ansible
&& pip install --break-system-packages --user ansible-pylibssh

ENV TZ=UTC \
GIT_USER=YANCoBaT \
Expand Down
2 changes: 1 addition & 1 deletion yancobat/ansible-cron
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0 */15 * * * * * poetry run ansible-playbook --diff -i /ansible/vars.yaml -i /repo/hosts.yaml yancobat-backup.yaml
0 */15 * * * * * ansible-playbook --diff -i /ansible/vars.yaml -i /repo/hosts.yaml yancobat-backup.yaml
2 changes: 1 addition & 1 deletion yancobat/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ if [ -f /run/secrets/NOTIFY_TELEGRAM_TOKEN ]; then
export NOTIFY_TELEGRAM_TOKEN=$(cat /run/secrets/NOTIFY_TELEGRAM_TOKEN)
fi

poetry run ansible-playbook -i /ansible/vars.yaml /ansible/yancobat-setup.yaml
ansible-playbook -i /ansible/vars.yaml /ansible/yancobat-setup.yaml
exec supercronic /ansible/crontab/ansible-cron

0 comments on commit a555190

Please sign in to comment.