Hyperling
d3357cb2d9
* Add a few aliases for initializing projects. * Begin creating executables in bin for flatpaks. Create an array to reduce future changes. * Add quotes. * Create files as user and set executable permissions. * Split exec dir from array section. * Increase interval for Telegraf but keep the flush at 30s.
213 lines
5.7 KiB
YAML
213 lines
5.7 KiB
YAML
---
|
|
# Use flatpaks because they're consistent! :)
|
|
|
|
## Flatpak Pre-reqs ##
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Install
|
|
package:
|
|
name: flatpak
|
|
update_cache: yes
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Add Flathub for System
|
|
flatpak_remote:
|
|
name: flathub
|
|
state: present
|
|
method: system
|
|
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
|
|
|
|
## Flatpak Installs ##
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Variables
|
|
set_fact:
|
|
flatpak_exec_dir: "{{ user_ling.home }}/bin"
|
|
|
|
# Generic #
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic Array
|
|
set_fact:
|
|
flatpaks_generic:
|
|
- { app: "org.libreoffice.LibreOffice", name: "office" }
|
|
- { app: "com.discordapp.Discord", name: "discord" }
|
|
- { app: "org.telegram.desktop", name: "telegram" }
|
|
- { app: "io.lbry.lbry-app", name: "lbry" }
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic Installs
|
|
flatpak:
|
|
name: "{{ item.app }}"
|
|
remote: flathub
|
|
state: present
|
|
loop: "{{ flatpaks_generic }}"
|
|
ignore_errors: yes
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic Executables
|
|
blockinfile:
|
|
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
|
|
block: |
|
|
flatpak run {{ item.app }}
|
|
marker: '{mark}'
|
|
marker_begin: "#!{{ bash_exec.stdout }}"
|
|
marker_end: "exit 0"
|
|
state: present
|
|
create: yes
|
|
loop: "{{ flatpaks_generic }}"
|
|
become_user: ling
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic Executable Permissions
|
|
file:
|
|
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
|
|
state: file
|
|
mode: '0755'
|
|
loop: "{{ flatpaks_generic }}"
|
|
|
|
# Coding #
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding Installs
|
|
flatpak:
|
|
name: "{{ item }}"
|
|
remote: flathub
|
|
state: present
|
|
loop:
|
|
- com.vscodium.codium
|
|
- com.google.AndroidStudio
|
|
- com.jetbrains.PyCharm-Community
|
|
- io.dbeaver.DBeaverCommunity
|
|
ignore_errors: yes
|
|
when: coding is defined
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding Uninstalls
|
|
flatpak:
|
|
name: "{{ item }}"
|
|
remote: flathub
|
|
state: absent
|
|
loop:
|
|
- com.vscodium.codium
|
|
- com.google.AndroidStudio
|
|
- com.jetbrains.PyCharm-Community
|
|
- io.dbeaver.DBeaverCommunity
|
|
ignore_errors: yes
|
|
when: coding is not defined
|
|
|
|
# Media Editors #
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editor Installs
|
|
flatpak:
|
|
name: "{{ item }}"
|
|
remote: flathub
|
|
state: present
|
|
loop:
|
|
- org.shotcut.Shotcut
|
|
- com.obsproject.Studio
|
|
- org.gimp.GIMP
|
|
ignore_errors: yes
|
|
when: editing is defined
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editor Uninstalls
|
|
flatpak:
|
|
name: "{{ item }}"
|
|
remote: flathub
|
|
state: absent
|
|
loop:
|
|
- org.shotcut.Shotcut
|
|
- com.obsproject.Studio
|
|
- org.gimp.GIMP
|
|
ignore_errors: yes
|
|
when: editing is not defined
|
|
|
|
# Gaming #
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming Installs
|
|
flatpak:
|
|
name: "{{ item }}"
|
|
remote: flathub
|
|
state: present
|
|
loop:
|
|
- com.valvesoftware.Steam
|
|
ignore_errors: yes
|
|
when: gaming is defined
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming Uninstalls
|
|
flatpak:
|
|
name: "{{ item }}"
|
|
remote: flathub
|
|
state: absent
|
|
loop:
|
|
- com.valvesoftware.Steam
|
|
ignore_errors: yes
|
|
when: gaming is not defined
|
|
|
|
# Removals #
|
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Application Uninstalls
|
|
flatpak:
|
|
name: "{{ item }}"
|
|
remote: flathub
|
|
state: absent
|
|
loop:
|
|
- org.mozilla.firefox
|
|
- com.visualstudio.code # Why does this throw an error? It's the correct ID.
|
|
- com.visualstudio.code-oss
|
|
- org.midori_browser.Midori
|
|
- com.github.Eloston.UngoogledChromium
|
|
- org.gnome.Evolution # Doesn't pick up GNOME theme since contained.
|
|
- org.mozilla.Thunderbird # Doesn't integrate with Nextcloud as well as Evolution.
|
|
- org.audacityteam.Audacity # Say "no thanks" to spyware.
|
|
ignore_errors: yes
|
|
|
|
|
|
## Other Stuff ##
|
|
|
|
# Software not yet available or working properly in Flatpak form.
|
|
- name: Workstation | Linux | Flatpak Distro | Package Manager | Install From Repo
|
|
package:
|
|
name:
|
|
- "{{ firefox_esr }}"
|
|
- vlc
|
|
- "{{ appimagelauncher }}"
|
|
- "{{ evolution }}"
|
|
- "{{ evolution }}*"
|
|
state: present
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Package Manager | Remove Firefox Normal
|
|
package:
|
|
name:
|
|
- "{{ firefox }}"
|
|
state: absent
|
|
when: firefox != firefox_esr
|
|
|
|
# Lutris #
|
|
- name: Workstation | Linux | Flatpak Distro | Package Manager | Add Lutris PPA (Ubuntu)
|
|
apt_repository:
|
|
repo: ppa:lutris-team/lutris
|
|
update_cache: yes
|
|
state: present
|
|
when: ansible_distribution == "Ubuntu" and gaming is defined
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Package Manager | Add Lutris (besides ARM)
|
|
package:
|
|
name:
|
|
- lutris
|
|
state: present
|
|
when: ansible_architecture != "aarch64" and gaming is defined
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Package Manager | Remove Lutris (besides ARM)
|
|
package:
|
|
name:
|
|
- lutris
|
|
state: absent
|
|
ignore_errors: yes
|
|
when: ansible_architecture != "aarch64" and gaming is not defined
|
|
|
|
- name: Workstation | Linux | Flatpak Distro | Package Manager | Remove Lutris PPA (Ubuntu)
|
|
apt_repository:
|
|
repo: ppa:lutris-team/lutris
|
|
update_cache: yes
|
|
state: absent
|
|
when: ansible_distribution == "Ubuntu" and gaming is not defined
|
|
|
|
# Remove Repo Software #
|
|
- name: Workstation | Linux | Flatpak Distro | Package Manager | Remove Applications
|
|
package:
|
|
name:
|
|
- "{{ thunderbird }}"
|
|
- steam
|
|
- vscode
|
|
- code
|
|
- '*libreoffice*'
|
|
- gimp
|
|
state: absent
|