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

Make discovering mitogen location less manual #27

Closed petemounce closed 4 years ago

petemounce commented 4 years ago

I think this could be done a couple different ways too, but there are drawbacks so I didn't try them:

  1. via an entrypoint script to wrap ansible-playbook, where that particular configuration key can be done via ANSIBLE_STRATEGY_PLUGINS="$(find / -type d | grep "ansible_mitogen/plugins" | sort | head -n 1)" ahead of running the ansible-playbook ${@} command
    • ... but that introduces overhead on every invoke, clearly
    • ... and it means that people who manage Windows machines would need a way to disable it (I think)
  2. via using a python venv + requirements.txt in every container to nail down the path precisely across all containers - but I'm not sufficiently python-y to knock that out quickly
willhallonline commented 4 years ago

I think that you are probably right over the two points mentioned. Thanks for the commit looks good to me.