mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Improved flatpak's ansible play and notes
This commit is contained in:
@@ -11,8 +11,11 @@
|
||||
- pkg_mgr
|
||||
hosts: all
|
||||
vars:
|
||||
flathub_enabled: true
|
||||
flathub_method: user
|
||||
flathub_name: flathub
|
||||
flathub_url: https://flathub.org/repo/flathub.flatpakrepo
|
||||
remotes: []
|
||||
tasks:
|
||||
- when: ansible_system == 'Linux'
|
||||
tags: linux
|
||||
@@ -30,9 +33,29 @@
|
||||
- configure
|
||||
- configuration
|
||||
block:
|
||||
- name: Enable the Flathub remote for the system
|
||||
tags: flathub
|
||||
- name: Add flathub to the remotes
|
||||
when: flathub_enabled
|
||||
set_fact:
|
||||
remotes: "{{ remotes + [ { 'name': flathub_name, 'method': flathub_method, 'url': flathub_url } ] }}"
|
||||
- name: Enable system remotes
|
||||
tags:
|
||||
- remote
|
||||
- remotes
|
||||
- system
|
||||
when: item.method == 'system'
|
||||
become: true
|
||||
community.general.flatpak_remote:
|
||||
name: "{{ flathub_name }}"
|
||||
flatpakrepo_url: "{{ flathub_url }}"
|
||||
name: "{{ item.name }}"
|
||||
flatpakrepo_url: "{{ item.url }}"
|
||||
loop: "{{ remotes }}"
|
||||
- name: Enable user remotes
|
||||
tags:
|
||||
- remote
|
||||
- remotes
|
||||
- user
|
||||
when: item.method == 'user'
|
||||
become: true
|
||||
community.general.flatpak_remote:
|
||||
name: "{{ item.name }}"
|
||||
flatpakrepo_url: "{{ item.url }}"
|
||||
loop: "{{ remotes }}"
|
||||
|
||||
@@ -3,18 +3,46 @@
|
||||
## TL;DR
|
||||
|
||||
```shell
|
||||
# add the `flathub` remote
|
||||
# List installed applications and runtimes.
|
||||
flatpak list
|
||||
flatpak list --app
|
||||
|
||||
# List remotes.
|
||||
flatpak remotes
|
||||
|
||||
# Add remotes.
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
# search for `vscode`
|
||||
# Search for applications.
|
||||
flatpak search vscode
|
||||
|
||||
# install `vscode`
|
||||
# Install applications.
|
||||
flatpak install fedora org.stellarium.Stellarium
|
||||
flatpak install --user flathub com.visualstudio.code-oss
|
||||
flatpak install https://flathub.org/repo/appstream/org.gimp.GIMP.flatpakref
|
||||
|
||||
# uninstall unused packages
|
||||
# Run applications.
|
||||
flatpak run org.gimp.GIMP
|
||||
|
||||
# Update applications.
|
||||
flatpak update
|
||||
|
||||
# Uninstall applications.
|
||||
flatpak uninstall org.stellarium.Stellarium
|
||||
flatpak uninstall --unused
|
||||
|
||||
# Remove remotes.
|
||||
flatpak remote-delete flathub
|
||||
|
||||
# Fix inconsitencies.
|
||||
flatpak repair
|
||||
|
||||
# Reset applications' permissions.
|
||||
flatpak permission-reset org.gimp.GIMP
|
||||
|
||||
# List operations.
|
||||
flatpak history
|
||||
```
|
||||
|
||||
## Further readings
|
||||
|
||||
Reference in New Issue
Block a user