Created
April 11, 2024 11:23
-
-
Save simonkowallik/6f9a45cbcae4336bcf6e297f8d8e710f to your computer and use it in GitHub Desktop.
f5networks collections ansible dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.11-bullseye | |
RUN useradd ansible -d /ansible -M -u 1000 | |
RUN apt update; apt upgrade -y; | |
RUN apt install -y \ | |
jq \ | |
less \ | |
vim \ | |
iproute2 \ | |
; | |
# https://pypi.org/project/ansible-core/#history | |
RUN pip3 install \ | |
'ansible-core>=2.14.2' \ | |
ansible \ | |
ansible-lint \ | |
yamllint \ | |
; | |
# https://github.com/F5Networks/f5-ansible/blob/devel/ansible_collections/f5networks/f5_modules/requirements.txt | |
# https://github.com/F5Networks/f5-ansible-bigip/blob/devel/ansible_collections/f5networks/f5_bigip/requirements.txt | |
# OS package requirements of f5_bigip and f5_modules | |
# RPM, below and others | |
# https://github.com/F5Networks/f5-ansible/blob/3ef63ec19c2ad7f319811d9a0ad1192f344344bc/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_lx_package.py#L165 | |
# https://github.com/F5Networks/f5-ansible-bigip/blob/32df61b3401b95eca2e35ed1099b6d8834f0ca7e/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_lx_package.py#L138 | |
RUN apt install -y \ | |
rpm \ | |
; | |
# requirements.txt of f5_bigip | |
RUN pip3 install \ | |
cryptography \ | |
objectpath \ | |
ordereddict \ | |
simplejson \ | |
paramiko \ | |
jinja2 \ | |
netaddr \ | |
; | |
# requirements.txt of f5_modules | |
RUN pip3 install \ | |
cryptography \ | |
objectpath \ | |
ordereddict \ | |
simplejson \ | |
packaging \ | |
; | |
RUN \ | |
echo ' UserKnownHostsFile /dev/null' >> /etc/ssh/ssh_config; \ | |
echo ' StrictHostKeyChecking no' >> /etc/ssh/ssh_config; | |
USER ansible | |
WORKDIR /ansible |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment