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.
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
.
Links
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 [email protected]
[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 [email protected]
[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 ~]$
Conclusion
Now you know how to install Zoom flatpak in RedHat-like systems with Ansible. Subscribe to the YouTube channel, Medium, and Website, X (formerly Twitter) to not miss the next episode of the Ansible Pilot.
Academy
Learn the Ansible automation technology with some real-life examples in my Udemy 300+ Lessons Video Course.
My book Ansible By Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps
Donate
Want to keep this project going? Please donate