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
|
- pkg_mgr
|
||||||
hosts: all
|
hosts: all
|
||||||
vars:
|
vars:
|
||||||
|
flathub_enabled: true
|
||||||
|
flathub_method: user
|
||||||
flathub_name: flathub
|
flathub_name: flathub
|
||||||
flathub_url: https://flathub.org/repo/flathub.flatpakrepo
|
flathub_url: https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
remotes: []
|
||||||
tasks:
|
tasks:
|
||||||
- when: ansible_system == 'Linux'
|
- when: ansible_system == 'Linux'
|
||||||
tags: linux
|
tags: linux
|
||||||
@@ -30,9 +33,29 @@
|
|||||||
- configure
|
- configure
|
||||||
- configuration
|
- configuration
|
||||||
block:
|
block:
|
||||||
- name: Enable the Flathub remote for the system
|
- name: Add flathub to the remotes
|
||||||
tags: flathub
|
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
|
become: true
|
||||||
community.general.flatpak_remote:
|
community.general.flatpak_remote:
|
||||||
name: "{{ flathub_name }}"
|
name: "{{ item.name }}"
|
||||||
flatpakrepo_url: "{{ flathub_url }}"
|
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
|
## TL;DR
|
||||||
|
|
||||||
```shell
|
```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 --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
flatpak remote-add --user --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
|
flatpak search vscode
|
||||||
|
|
||||||
# install `vscode`
|
# Install applications.
|
||||||
|
flatpak install fedora org.stellarium.Stellarium
|
||||||
flatpak install --user flathub com.visualstudio.code-oss
|
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
|
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
|
## Further readings
|
||||||
|
|||||||
Reference in New Issue
Block a user