Skip to content

Commit

Permalink
Back port recent changes from mw-projects (#179)
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Donneaux <[email protected]>
  • Loading branch information
btlogy authored Sep 5, 2024
1 parent 01f69a0 commit e2ceade
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 38 deletions.
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ updates:
reviewers:
- "btlogy"
- package-ecosystem: "docker"
directory: "/ansible/docker/feedback"
directory: "/ansible/files/docker/stack/feedback"
schedule:
interval: "daily"
time: "12:30"
reviewers:
- "btlogy"
- package-ecosystem: "docker"
directory: "/ansible/docker/mailbox"
directory: "/ansible/files/docker/stack/mailbox"
schedule:
interval: "daily"
time: "12:30"
reviewers:
- "btlogy"
- package-ecosystem: "docker"
directory: "/ansible/docker/relay"
directory: "/ansible/files/docker/stack/relay"
schedule:
interval: "daily"
time: "12:30"
reviewers:
- "btlogy"
- package-ecosystem: "docker"
directory: "/ansible/docker/traefik"
directory: "/ansible/files/docker/stack/traefik"
schedule:
interval: "daily"
time: "12:30"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 19 additions & 7 deletions docker/ansible/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@
##############################

# Pull official base image from DockerHub
FROM python:3.9.18-slim-bullseye@sha256:85f0831e26d72c7c6e1eff1c6b395679c8a1d82965081e2b6b29fc3da17f7ffe
FROM debian:bookworm-20240812@sha256:aadf411dc9ed5199bc7dab48b3e6ce18f8bbee4f170127f5ff1b75cd8035eb36

# Avoid interactive frontend
ENV DEBIAN_FRONTEND="noninteractive"
# Pass some wellknown variables
ENV LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive

##################################
# Application level requirements #
##################################

# Install required packages to install Ansible
RUN INSTALL_PKGS="python3-pip python3-venv" && \
apt-get -q clean && \
apt-get -q update && \
apt-get install -y $INSTALL_PKGS && \
apt-get -q clean

###########################
# User level requirements #
###########################
Expand Down Expand Up @@ -49,14 +57,18 @@ ENV HOME=/home/${user}
ENV PATH="${HOME}/.local/bin:${PATH}"
ENV PYTHONPATH="."

# Upgrade Pip
RUN python -m pip install --disable-pip-version-check --no-cache --upgrade "pip==23.3.2"
# Prepare the virtual Python env
RUN python3 -m venv --system-site-packages --symlinks .venv
ENV PATH="${HOME}/.venv/bin:${PATH}"

# Copy requirements
COPY requirements.txt /home/${user}/requirements.txt

# Install requirements
RUN python -m pip install --user --no-cache --upgrade -r requirements.txt
# TIP to upgrade/downgrade those:
# - use `python3 -m pip install --no-cache --upgrade ansible[==x.y.z]`,
# - then `python3 -m pip freeze > requirements.txt` to upgrade Ansible and its dependencies.
RUN pip install --no-cache --upgrade -r requirements.txt

# Install additional Ansible requirements
COPY requirements.yml /home/${user}/requirements.yml
Expand All @@ -66,7 +78,7 @@ RUN ansible-galaxy install -r requirements.yml
USER root

# Install some required packages for testing
RUN INSTALL_PKGS="sudo python3-apt python3-pip openssh-server" && \
RUN INSTALL_PKGS="sudo python3-apt openssh-server" && \
apt-get -q clean && \
apt-get -q update && \
apt-get install -y $INSTALL_PKGS && \
Expand Down
54 changes: 28 additions & 26 deletions docker/ansible/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
ansible==8.7.0
ansible-compat==4.1.11
ansible-core==2.15.8
ansible-lint==6.22.2
ansible==10.3.0
ansible-compat==24.8.0
ansible-core==2.17.3
ansible-lint==24.7.0
attrs==23.2.0
black==23.12.1
black==24.4.2
bracex==2.4
certifi==2023.11.17
certifi==2024.7.4
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
cryptography==41.0.7
filelock==3.13.1
idna==3.6
importlib-resources==5.0.7
Jinja2==3.1.3
jsonschema==4.21.1
cryptography==42.0.8
filelock==3.15.4
idna==3.7
importlib-resources==5.13.0
importlib_metadata==8.4.0
Jinja2==3.1.4
jsonschema==4.23.0
jsonschema-specifications==2023.12.1
markdown-it-py==3.0.0
MarkupSafe==2.1.3
MarkupSafe==2.1.5
mdurl==0.1.2
mypy-extensions==1.0.0
packaging==23.2
packaging==24.1
pathspec==0.12.1
platformdirs==4.1.0
pycparser==2.21
platformdirs==4.2.0
pycparser==2.22
Pygments==2.17.2
PyYAML==6.0.1
referencing==0.32.1
requests==2.31.0
referencing==0.35.1
requests==2.29.0
resolvelib==1.0.1
rich==13.7.0
rpds-py==0.17.1
ruamel.yaml==0.18.5
rich==13.7.1
rpds-py==0.20.0
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
subprocess-tee==0.4.1
subprocess-tee==0.4.2
tomli==2.0.1
typing_extensions==4.9.0
urllib3==2.1.0
wcmatch==8.5
yamllint==1.33.0
typing_extensions==4.12.2
urllib3==1.26.20
wcmatch==8.5.2
yamllint==1.35.1
zipp==3.20.0
2 changes: 1 addition & 1 deletion docker/ansible/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
collections:
- name: community.docker
version: 3.5.0
version: 3.8.1
- name: ansible.posix
version: 1.5.4
roles:
Expand Down

0 comments on commit e2ceade

Please sign in to comment.