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 Red Hat Using Ansible — Video Tutorial
Use Ansible to install Google Chrome on Red Hat. Follow our detailed playbook to add repositories and install Chrome efficiently.
What You'll Learn
- Ansible install Google Chrome in RedHat-like systems
- Parameters
- code
- execution
- verification
- Conclusion
- Related Articles
Full Tutorial Content
How to Install Google Chrome in RedHat-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 RedHat-like systems
- Add Google Chrome key => ansible.builtin.rpm_key
- Add Google Chrome repository => ansible.builtin.yum_repository
- Update yum cache and install Google Chrome => ansible.builtin.yum
In order to install Google Chrome on a RedHat-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 `yum/dnf`, your distribution package manager looks like for software.
You are going to use the `ansible.builtin.yum_repository` Ansible module.
The third step is to update the yum cache for the available packages and install Google Chrome using the `ansible.builtin.yum` Ansible module.
Parameters
- `rpm_key` `key` string — URL
- `rpm_key` `state` string — present/absent
- `yum_repository` `name` string — repository
- `yum_repository` `baseurl` string — URL
- `yum_repository` `gpgcheck` boolean — enable GPG
- `yum_repository` `gpgkey` string — GPG check and key URL
- `yum` `name` string — name or package-specific
- `yum` `state` string — latest/present/absent
- `yum` `update_cache` boolean — no/yes
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.
For the `ansible.builtin.yum_repository` Ansible module I’m going to use four parameters: `“name”`, `“baseurl”`, `“gpgcheck”` and `“gpgkey”`.
The “name” parameter specifies the repository parameters and the `“baseurl”` URL of it.
The `“gpgcheck”` parameter enables the gpg verification with the URL specified in `“gpgkey”` parameter.
For the `ansible.builtin.yum` 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 an update of the yum cache to ensure that the latest version of the package is going to be downloaded.
## Playbook
Install Google Chrome in RedHat-like systems with Ansible Playbook.
code
- install_chrome_redhat.yml
```yaml
---
- name: install Google Chrome
hosts: all
become: true
tasks:
- name: Add Yum signing key
ansible.builtin.rpm_key:
key: https://dl.google.com/linux/linux_signing_key.pub
About This Tutorial
- Author: Luca Berton
- Difficulty: Beginner
- Read time: 4 min
- Category: installation
Read the full written article: Install Google Chrome on Red Hat Using Ansible
Related Video Tutorials
- Ansible Playbook for Installing Docker on Linux Systems — Learn how to install Docker on Linux systems using an Ansible playbook. Follow our guide for a seamless Docker setup and start process.
- Install Microsoft Edge in RedHat-like systems - Ansible module rpm_key, yum_repository and yum — How to install the latest Microsoft Edge Stable on a RedHat-like workstation verify software using the public GPG key and set up the Microsoft repository. Included Playbook in Fedora 34.
- Install Google Chrome on Suse with Ansible — 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.
- Deploy Squid Proxy on RedHat Systems with Ansible — Learn to deploy and configure a Squid proxy server on RedHat-like systems using Ansible. Follow our step-by-step guide with simple Ansible code examples.
- Efficient Web Server Setup Using Ansible Playbook — Set up a web server effortlessly with our Ansible playbook tutorial. Follow step-by-step instructions for installing and configuring HTTPD service.
- 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.