Description: Here I have explained, How to install Google Chrome using Ansible
- Download Google Chrome installer in Ansible machine using wget command
- Create Ansible playbook for google chrome as follow. Below playbook will copy installer zip file then extract and run the installer file
# vi google_chrome.yaml
- hosts: win gather_facts: no tasks: - name: Copy the bundle.zip win_copy: src: GoogleChromeEnterpriseBundle64.zip dest: C:\\Temp\\ - name: Extract the bundle win_unzip: src: c:\\Temp\\GoogleChromeEnterpriseBundle64.zip dest: C:\\Temp\\Chrome - name: Install Chrome win_package: path: C:\\Temp\\Chrome\\Installers\\GoogleChromeStandaloneEnterprise64.msi product_id: '{B93553B7-F366-388E-ADB8-EDEAC41EADC2}' wait: yes state: present when: ACTION == "Install" - name: Uninstall Chrome win_package: path: C:\\Temp\\Chrome\\Installers\\GoogleChromeStandaloneEnterprise64.msi product_id: '{B93553B7-F366-388E-ADB8-EDEAC41EADC2}' wait: yes state: absent when: ACTION == "Uninstall" # - name: Uninstall Chrome Update helper # win_package: # path: C:\\Temp\\Chrome\\Installers\\GoogleChromeStandaloneEnterprise64.msi # wait: yes # state: absent # when: ACTION == "Uninstall" - name: Clean up the bundle.zip win_file: path: C:\\Temp\\GoogleChromeEnterpriseBundle64.zip state: absent - name: Clean up the bundle win_file: path: C:\\Temp\\Chrome state: absent
# ansible-playbook google_chrome.yaml -e ACTION=Install
- Once it runs successfully verify in windows machine you will get in the installed software list
Perfect man...
ReplyDeleteusefull for many IT people
ReplyDeleteMuch appreciated! I was having trouble downloading Chrome and didn't want to use Chocolatey
ReplyDeleteTry to download using google from below URL
Deletehttps://support.google.com/chrome/a/answer/7650032?hl=en