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

Dockerfile for ansible 2.9 take the latest mitogen version #43

Closed lirany1 closed 2 years ago

lirany1 commented 2 years ago

pip3 install mitogen ansible-lint jmespath && \

from mitogen site:

v0.3.0 (unreleased)
This release separates itself from the v0.2.X releases. Ansible’s API changed too much to support backwards compatibility so from now on, v0.2.X releases will be for Ansible < 2.10 and v0.3.X will be for Ansible 2.10+. See here for details.

how can we use a specific version of mitogen with this ansible image?

    - name: ansible
      image: willhallonline/ansible:2.9-alpine-3.13
      command: [cat]
      tty: true
      imagePullPolicy: Always
      env:
        - name: ANSIBLE_FORKS
          value: 20
        - name: ANSIBLE_STRATEGY
          value: mitogen_linear
        - name: ANSIBLE_PIPELINING
          value: True
        - name: ANSIBLE_STRATEGY_PLUGINS
          value: /usr/lib/python3.8/site-packages/ansible_mitogen/plugins/strategy
        - name: ANSIBLE_SSH_PIPELINING
          value: True
        - name: ANSIBLE_HOST_KEY_CHECKING
          value: False
        - name: ANSIBLE_GATHERING
          value: smart
        - name: ANSIBLE_CACHE_PLUGIN_CONNECTION
          value: /tmp/facts_cache
        - name: ANSIBLE_CACHE_PLUGIN
          value: jsonfile
        - name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
          value: 7200
        - name: ANSIBLE_SSH_RETRIES
          value: 3
        - name: ANSIBLE_TIMEOUT
          value: 60
willhallonline commented 2 years ago

I've not thought about adding these all in as variables, that is really nice. No, at the moment, I haven't made the Mitogen version a variable, it shouldn't be too hard to achieve, I believe it just needs to be ==v0.2.X ("v0.2.X releases will be for Ansible < 2.10").

lirany1 commented 2 years ago

Cool mate 10x :)

Lusitaniae commented 2 years ago

mitogen==v0.2.10 ansible-lint==v5.4.0