Docker Ansible Environment

Docker Ansible Environment

We've all been there: your own development environment doesn't match the live system, either because the target system has a different version, Python or pip is outdated, or you want to test a new configuration.

Of course, you can update the systems and synchronize the configurations, but this involves more effort and is sometimes a balancing act due to outdated packages of the individual distributions.

In short, having a consistent environment for the Ansible control host saves a ton of time.

Virtual machines are a good option here, but you can also spend a lot of time and effort very quickly if you want to test different Ansible configurations.

Docker container as solution

The Docker image I've put together here uses the current Ubuntu image (24.04 LTS), the latest Ansible version (core 2.16.7) and Python (3.12.3).

It also includes OpenSSH and a zsh / ohmyzsh environment.

You can find the project in my GitHub repository (https://github.com/davidkrcek/docker_ansible), where you can upload your SSH key and certificates if you're behind a Zscaler or similar and create your own image.

If you're not familiar with Docker configuration and building images, or just want a quick start, you can also use my Docker Hub image. https://hub.docker.com/repository/docker/rotecodefraktion/ansible_docker/general

#ansible #devops #automation

要查看或添加评论,请登录

David Krcek的更多文章

社区洞察

其他会员也浏览了