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 Debian-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 Debian-like systems using Ansible module flatpak.

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

How to install Zoom flatpak in Debian-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: Install Zoom flatpak in RedHat-like systems - Ansible module flatpak

Ansible install Zoom flatpak in Debian-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: Install Docker in Debian-like systems - Ansible module apt_key, apt_repository and apt

Links

Flatpak technologyZoom flatpak

## Playbook

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

code

---
- name: flatpak module Playbook
  hosts: all
  become: true
  gather_facts: false
  tasks:
    - name: flatpak present
      ansible.builtin.apt:
        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/ubuntu2110desktop/inventory container/flatpak_debian.yml
PLAY [flatpak module Playbook] ************************************************************************
TASK [flatpak present] ****************************************************************************
changed: [ubuntu2110.example.com]
TASK [flathub flatpak repo] ***********************************************************************
changed: [ubuntu2110.example.com]
TASK [install Zoom via flatpak] *******************************************************************
changed: [ubuntu2110.example.com]
PLAY RECAP ****************************************************************************************
ubuntu2110.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/ubuntu2110desktop/inventory container/flatpak_debian.yml
PLAY [flatpak module Playbook] ************************************************************************
TASK [flatpak present] ****************************************************************************
ok: [ubuntu2110.example.com]
TASK [flathub flatpak repo] ***********************************************************************
ok: [ubuntu2110.example.com]
TASK [install Zoom via flatpak] *******************************************************************
ok: [ubuntu2110.example.com]
PLAY RECAP ****************************************************************************************
ubuntu2110.example.com     : ok=3    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
ansible-pilot $

before execution

ansible-pilot $ ssh devops@ubuntu2110.example.com
Welcome to Ubuntu 21.10 (GNU/Linux 5.13.0-30-generic x86_64)
* Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage
0 updates can be applied immediately.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
$ flatpak list
-sh: 1: flatpak: not found
$ flatpak remotes
-sh: 2: flatpak: not found
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 21.10"
NAME="Ubuntu"
VERSION_ID="21.10"
VERSION="21.10 (Impish Indri)"
VERSION_CODENAME=impish
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=impish
$ exit
Connection to ubuntu2110.example.com closed.
ansible-pilot $

after execution

ansible-pilot $ ssh devops@ubuntu2110.example.com
Welcome to Ubuntu 21.10 (GNU/Linux 5.13.0-30-generic x86_64)
* Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage
0 updates can be applied immediately.
Last login: Wed Mar  2 06:33:23 2022 from 192.168.0.59
$ flatpak list
Name                   Application ID                        Version      Branch   Installation
Freedesktop Platform   org.freedesktop.Platform              21.08.10     21.08    system
Mesa                   org.freedesktop.Platform.GL.default   21.3.5       21.08    system
openh264               org.freedesktop.Platform.openh264     2.1.0        2.0      system
Zoom                   us.zoom.Zoom                          5.9.6.2225   stable   system
$ flatpak remotes
Name    Options
flathub system
$

code with ❤️ in GitHub

Conclusion

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

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

Related Articles

using become for sudo in AnsibleAnsible inventory complete reference

Category: installation

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

Browse all Ansible tutorials · AnsiblePilot Home