Chocolatey role

The next role uses Chocolatey to install a few bits of software on the machine.

Chocolatey is a package manager for Windows, similar in principle and functionality to Homebrew, which we used in earlier chapters to install the software we needed on macOS with a single command. Chocolatey simplifies the installation of packages on the command line by wrapping the installation process for most common Windows installers into a common set of PowerShell commands—perfect for an orchestration tool such as Ansible.

To add the files needed for the role, run the following command:

$ ansible-galaxy init roles/choc

In roles/choc/defaults/main.yml, we have a list of the packages we want to install:

apps:  - "notepadplusplus.install" - "putty.install" ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.