Install Docker in Windows-like systems - Ansible module win_chocolatey
By Luca Berton · Published 2024-01-01 · Category: installation
How to automate the installation of the latest version of Docker Desktop in your Windows-like system with Ansible Playbook and Chocolatey.
How to Install Docker in Windows-like systems with Ansible?
Today I'm going to reveal how to install the software in a Windows-managed host using Chocolatey Package Manager. I'm Luca Berton and welcome to today's episode of Ansible Pilot.
Ansible module win_chocolatey • chocolatey.chocolatey.win_chocolatey • Manage packages using chocolatey
Chocolatey is the package manager for windows, it has the largest online registry of Windows packages. At the moment it contains nearly 9000 Community Maintained Packages. Today we're talking about Ansible module win_chocolatey to automate the software installation process. The full name is chocolatey.chocolatey.win_chocolatey, which means that is part of the collection distributed by "chocolatey". It manages packages in Windows using chocolatey. It's the windows correspondent of the ansible package module.
Parameters • name list-string - the name of the package • state string - present/latest/absent/downgrade/reinstalled • version string - specific version
The parameter list is pretty wide but this four are the most important options. In the "name" parameter you are going to specify the name of the package or a list of packages. If you would like to install a specific version you could specify it in the "version" parameter. The state specifies the action that we would like to perform. In our case installation is "present or latest".
Links • Docker Desktop via Chocolatey
## Playbook
Install Docker in Windows-like systems with Ansible Playbook.
code
execution
idempotency
Conclusion
Now you know how to install Docker in Windows-like systems with Ansible.
Related Articles • Ansible Docker Guide • Ansible Inventory Guide • Ansible Become Guide • Ansible for Windows Guide
Category: installation
Watch the video: Install Docker in Windows-like systems - Ansible module win_chocolatey — Video Tutorial