Ansible Pilot

Install Google Chrome in Windows-like systems - Ansible module win_chocolatey

How to install the latest Google Chrome Stable on a Windows-like workstation using the chocolatey package manager. Included demo in Windows 2019.

November 4, 2021
Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons

How to Install Google Chrome 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 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.


The parameter list is pretty wide but these three 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 for install is “present or latest”.

The Best Resources For Ansible


Video Course

Printed Book



Install Google Chrome in Windows-like systems with Ansible Playbook.


- name: install Google Chrome
  hosts: all
  become: false
  gather_facts: false
    - name: install packages
        name: "googlechrome"
        state: present


$ ansible-playbook -i win/inventory install\ chrome/windows.yml

PLAY [install Google Chrome] **********************************************************************

TASK [install packages] ***************************************************************************
changed: [WindowsServer]

PLAY RECAP ****************************************************************************************
WindowsServer              : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

code with ❤️ in GitHub


Now you know how to install Google Chrome in Windows-like systems using the chocolatey package manager with Ansible. Subscribe to the YouTube channel, Medium, and Website, X (formerly Twitter) to not miss the next episode of the Ansible Pilot.


Learn the Ansible automation technology with some real-life examples in my

My book Ansible By Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps

BUY the Complete PDF BOOK to easily Copy and Paste the 250+ Ansible code

Want to keep this project going? Please donate

Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons
Follow me

Subscribe not to miss any new releases