Loading...

Watch: 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.

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

Read the full tutorial: Install Google Chrome on Suse with Ansible