Install Google Chrome in Suse-like systems — Ansible module rpm_key, zypper_repository and zypper
How to Install Google Chrome in Suse-like systems with Ansible?
I’m going to show you a live demo 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.
- 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…