willhallonline / docker-ansible

Ansible inside Docker containers: Alpine, Ubuntu, Rocky & Debian with Ansible 2.16, 2.15, 2.14, 2.13, 2.12, 2.11, 2.10 and 2.9 + Mitogen
https://www.willhallonline.co.uk/project/docker/docker-ansible/
MIT License
376 stars 135 forks source link

Add the possibility to set ansible minor version #39

Closed meons closed 2 years ago

meons commented 3 years ago

It would be nice to add the possibility to set ansible minor version.

For example for ansible 2.10 and based on ansible doc, something like that could be implemented:

...
# set ansible version
ENV ANSIBLE_VERSION 2.10.4
...
RUN pip3 install "ansible-base==${ANSIBLE_VERSION}"
...

The key point is to replace ansible by ansible-base (see referenced doc above), otherwise the latest minor version (currently 2.10.13) will always be installed whatever you set in the line pip3 install ansible==2.10.7 && \.

What do you think?

willhallonline commented 2 years ago

I should do this... I haven't done it yet, so I'll leave this issue here for when I do get round to it. Thanks for contributing.

willhallonline commented 2 years ago

You know when you ask about something and then you get around to it eventually... Well, this is done now. Thanks again to @meons for making the issue.