AnsiblePilot — Master Ansible Automation
AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,100 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.
Popular Topics
About Luca Berton
Luca Berton is an Ansible automation expert, author of "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example" published by Apress, and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.
Install Google Chrome on Suse with Ansible — Video Tutorial
Learn how to install the latest Google Chrome Stable on SUSE Linux Enterprise Server and openSUSE using Ansible. Follow our step-by-step guide and Playbook for verification and repository setup.
What You'll Learn
- Ansible install Google Chrome in Suse-like systems
- Parameters
- code
- execution
- before Ansible execution
- after Ansible execution
- Related Articles
Full Tutorial Content
How to Install Google Chrome in Suse-like systems with Ansible?
I'm going to show you a live Playbook with some simple Ansible code.
I'm Luca Berton and welcome to today's episode of Ansible Pilot.
Ansible install Google Chrome in Suse-like systems
- Add Google Chrome key => ansible.builtin.rpm_key
- Add Google Chrome repository => community.general.zypper_repository
- Update yum cache and install Google Chrome => community.general.zypper
In order to install Google Chrome on a Suse-like system, we need to perform three different steps.
The first step is to download the GPG signature key for the repository. You are going to use the `ansible.builtin.rpm_key` Ansible module.
This encrypted key verifies the genuinity of the packages and the repository and guarantees that the software is the same as Google releases.
The second step is to add the add Google Chrome repository to the distribution. It's an extra website where `zypper`, your distribution package manager, looks like for software.
You are going to use the `community.general.zypper_repository` Ansible module.
The third step is to refresh the zypper cache for the available packages and install Google Chrome using the `community.general.zypper` Ansible module.
Parameters
- `rpm_key` key string - URL
- `rpm_key` state string - present/absent
For the `ansible.builtin.rpm_key` Ansible module I'm going to use two parameters: "key" and "state".
The "key" parameter specifies the URL or the key ID of the repository GPG signature key and the "state" verify that is present in our system after the execution.
- zypper_repository name string
- zypper_repository description string - repository
- zypper_repository repo string - URL
- zypper_repository auto_import_keys boolean - GPG signature
For the `community.general.zypper_repository` Ansible module I'm going to use four parameters: "name"/"description", "repo", and "auto_import_keys".
The "name" and "description" parameters specify the repository name in the Suse system and the "repo" URL of it.
The "auto_import_keys" parameter enables the GPG verification and imports of the suitable keys.
- zypper name string - name or package-specific
- zypper state string - latest/present/absent
- zypper update_cache boolean - no/yes
For the `community.general.zypper` Ansible module I'm going to use three parameters: "name", "state" and "update_cache".
The "name" parameter specifies the package name (Google Chrome in our use-case) and the "state" verify that is present in our system after the execution.
Before installing the package the "update_cache" performs a refresh of the zypper cache to ensure that the latest version of the package is going to be downloaded.
## Playbook
Let's jump into a real-life Ansible Playbook to install Google Chrome in Suse-like systems.
code
- install_chrome_suse.yml
```yaml
---
- name: install Google Chrome
hosts: all
become: true
tasks:
- name: Add rpm signing key
ansible.builtin.rpm_key:
key: ht
About This Tutorial
- Author: Luca Berton
- Difficulty: Beginner
- Read time: 5 min
- Category: installation
Read the full written article: Install Google Chrome on Suse with Ansible
Related Video Tutorials
- Install Google Chrome on Red Hat Using Ansible — Use Ansible to install Google Chrome on Red Hat. Follow our detailed playbook to add repositories and install Chrome efficiently.
- Install Google Chrome in Debian like systems - Ansible module apt_key, apt_repository and apt — How to install the latest Google Chrome Stable on a Debian-like workstation (Debian, Ubuntu, Linux Mint, MX Linux, Deepin, AntiX, PureOS, Kali Linux, Parrot OS, Devuan, Knoppix, AV Linux Linux) verify software using the public GPG key and set up the Google repository. Included Playbook in Ubuntu 20.04 LTS.
- 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 Playbook in Windows 2019.
- Install a package in Suse-like systems - Ansible module zypper — A real-life example of how to install a package in Suse-like systems: SUSE Linux Enterprise Server and openSUSE
- Add Secondary Groups to Linux Users with Ansible Playbook — Learn how to add secondary groups to Linux users with an Ansible playbook. This step-by-step guide includes YAML configuration and execution details.
- Ansible code in RHSB-2021-009 Log4Shell - Remote Code Execution - log4j (CVE-2021-44228) — Learn how my Ansible Playbook was featured in Red Hat Security Bulletin RHSB-2021-009 to address the Log4Shell vulnerability (CVE-2021-44228). Discover the playbook and its role in mitigating security risks.