Skip to content

Commit

Permalink
Upgrade Ansible and its dependencies (#136)
Browse files Browse the repository at this point in the history
* Upgrade Ansible and its dependencies
* Upgrade Ansible collections/roles too
* Match steps from elsewhere
* Add same role as infrastructure
---------

Signed-off-by: Benoit Donneaux <[email protected]>
btlogy authored Jan 8, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent f6ce388 commit caf07ae
Showing 3 changed files with 63 additions and 33 deletions.
21 changes: 20 additions & 1 deletion docker/ansible/Dockerfile
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ ENV PATH="${HOME}/.local/bin:${PATH}"
ENV PYTHONPATH="."

# Upgrade Pip
RUN python -m pip install --disable-pip-version-check --no-cache --upgrade "pip==23.1"
RUN python -m pip install --disable-pip-version-check --no-cache --upgrade "pip==23.3.2"

# Copy requirements
COPY requirements.txt /home/${user}/requirements.txt
@@ -61,3 +61,22 @@ RUN python -m pip install --user --no-cache --upgrade -r requirements.txt
# Install additional Ansible requirements
COPY requirements.yml /home/${user}/requirements.yml
RUN ansible-galaxy collection install -r requirements.yml

# Some extra steps to allow local testing
USER root

# Install some required packages for testing
RUN INSTALL_PKGS="sudo python3-apt python3-pip openssh-server" && \
apt-get -q clean && \
apt-get -q update && \
apt-get install -y $INSTALL_PKGS && \
apt-get -q clean

# Allow user to become while testing playbook locally
RUN echo -n "Defaults:${user} " > /etc/sudoers.d/ansible && \
echo '!requiretty' >> /etc/sudoers.d/ansible && \
echo "${user} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/ansible

# Switch back to non-root user
USER ${user}
WORKDIR /home/${user}
68 changes: 38 additions & 30 deletions docker/ansible/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
ansible==7.5.0
ansible-compat==2.2.5
ansible-core==2.14.5
ansible-lint==6.9.0
attrs==23.1.0
black==22.10.0
bracex==2.3.post1
cffi==1.15.1
click==8.1.3
commonmark==0.9.1
cryptography==40.0.2
filelock==3.8.0
ansible==8.7.0
ansible-compat==4.1.10
ansible-core==2.15.8
ansible-lint==6.22.1
attrs==23.2.0
black==23.12.1
bracex==2.4
certifi==2023.11.17
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.2
jsonschema==4.17.1
MarkupSafe==2.1.2
mypy-extensions==0.4.3
packaging==23.1
pathspec==0.10.2
platformdirs==2.5.4
jsonschema==4.20.0
jsonschema-specifications==2023.12.1
markdown-it-py==3.0.0
MarkupSafe==2.1.3
mdurl==0.1.2
mypy-extensions==1.0.0
packaging==23.2
pathspec==0.12.1
platformdirs==4.1.0
pycparser==2.21
Pygments==2.13.0
pyparsing==3.0.9
pyrsistent==0.19.2
PyYAML==6.0
resolvelib==0.8.1
rich==12.6.0
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.7
subprocess-tee==0.4.0
Pygments==2.17.2
PyYAML==6.0.1
referencing==0.32.1
requests==2.31.0
resolvelib==1.0.1
rich==13.7.0
rpds-py==0.16.2
ruamel.yaml==0.18.5
ruamel.yaml.clib==0.2.8
subprocess-tee==0.4.1
tomli==2.0.1
typing_extensions==4.4.0
wcmatch==8.4.1
yamllint==1.28.0
typing_extensions==4.9.0
urllib3==2.1.0
wcmatch==8.5
yamllint==1.33.0
7 changes: 5 additions & 2 deletions docker/ansible/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
collections:
- name: community.docker
version: 3.4.3
version: 3.5.0
- name: ansible.posix
version: 1.5.2
version: 1.5.4
roles:
- name: johanmeiring.sftp-server
version: v3.1.4

0 comments on commit caf07ae

Please sign in to comment.