AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 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 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", 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 Zoom flatpak in RedHat-like systems - Ansible module flatpak

By Luca Berton · Published 2024-01-01 · Category: installation

How to automate the installation of Zoom flatpak system-wide in RedHat-like systems using Ansible module flatpak.

Install Zoom flatpak in RedHat-like systems - Ansible module flatpak

How to install Zoom flatpak 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.

See also: Update Zoom flatpak(s) in Linux systems - Ansible module command

Ansible install Zoom flatpak in RedHat-like systems

community.general.flatpak • Manage flatpaks

Today we are going to talk about the Ansible module flatpak. The full name is community.general.flatpak, it's part of community.general modules maintained by the Ansible Community. The purpose of the flatpak module is to Manage flatpaks in the target system.

Parameters

• name _string_ - flatpak name • state _string_ - present/absent • method _string_ - system/user • remote _string_ - flathub • no_dependencies _string_ - no/yes • executable _string_ - flatpak

Let me summarize the parameters of flatpak module. The only required is "name", where you specify the flatpak name to install or remove. The parameter "state" specifies if you would like to perform the install action ("present" option) or the remove action ("absent" option). The parameter "method" specifies if you would like to install the flatpak system-wide (default) or only for the current user. The following parameters are more for advanced users. For example specify a different source with remote parameter other than the default "flathub"; not install the dependency "no_dependencies" parameter or if the executable is different than the usual flatpak.

See also: Ansible Playbook for Installing Docker on Linux Systems

Links

Flatpak technologyZoom flatpak

## Playbook

How to install Zoom flatpak in RedHat-like systems with Ansible Playbook.

code

---
- name: flatpak module Playbook
  hosts: all
  become: true
  gather_facts: false
  tasks:
    - name: flatpak present
      ansible.builtin.yum:
        name: flatpak
        state: present
    - name: flathub flatpak repo
      community.general.flatpak_remote:
        name: flathub
        state: present
        flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
        method: system
    - name: install Zoom via flatpak
      community.general.flatpak:
        name: us.zoom.Zoom
        state: present
        method: system

execution

ansible-pilot $ ansible-playbook -i virtualmachines/fedora35/inventory container/flatpak_redhat.yml
PLAY [flatpak module Playbook] ************************************************************************
TASK [flatpak present] ****************************************************************************
changed: [fedora.example.com]
TASK [flathub flatpak repo] ***********************************************************************
changed: [fedora.example.com]
TASK [install Zoom via flatpak] *******************************************************************
changed: [fedora.example.com]
PLAY RECAP ****************************************************************************************
fedora.example.com         : ok=3    changed=3    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
ansible-pilot $

idempotency

ansible-pilot $ ansible-playbook -i virtualmachines/fedora35/inventory container/flatpak_redhat.yml
PLAY [flatpak module Playbook] ************************************************************************
TASK [flatpak present] ****************************************************************************
ok: [fedora.example.com]
TASK [flathub flatpak repo] ***********************************************************************
ok: [fedora.example.com]
TASK [install Zoom via flatpak] *******************************************************************
ok: [fedora.example.com]
PLAY RECAP ****************************************************************************************
fedora.example.com         : ok=3    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
ansible-pilot $

before execution

ansible-pilot $ ssh devops@fedora.example.com
[devops@fedora ~]$ cat /etc/os-release
NAME="Fedora Linux"
VERSION="35 (Cloud Edition)"
ID=fedora
VERSION_ID=35
VERSION_CODENAME=""
PLATFORM_ID="platform:f35"
PRETTY_NAME="Fedora Linux 35 (Cloud Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:35"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f35/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=35
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=35
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Cloud Edition"
VARIANT_ID=cloud
[devops@fedora ~]$ flatpak list
-bash: flatpak: command not found
[devops@fedora ~]$ flatpak remotes
-bash: flatpak: command not found
[devops@fedora ~]$ rpm -qa | grep flatpak

after execution

ansible-pilot $ ssh devops@fedora.example.com
[devops@fedora ~]$ flatpak list
Name                   Application ID                        Version      Branch   Installation
Freedesktop Platform   org.freedesktop.Platform              21.08.11     21.08    system
Mesa                   org.freedesktop.Platform.GL.default   21.3.6       21.08    system
openh264               org.freedesktop.Platform.openh264     2.1.0        2.0      system
Zoom                   us.zoom.Zoom                          5.9.6.2225   stable   system
[devops@fedora ~]$ flatpak remotes
Name    Options
flathub system
[devops@fedora ~]$

code with ❤️ in GitHub

Conclusion

Now you know how to install Zoom flatpak in RedHat-like systems with Ansible.

See also: Install Spotify snap in RedHat-like systems - Ansible module snap

Related Articles

switching users with Ansible becomehow Ansible inventory works

Category: installation

Watch the video: Install Zoom flatpak in RedHat-like systems - Ansible module flatpak — Video Tutorial

Browse all Ansible tutorials · AnsiblePilot Home