Increase Telegraf Frequency + Flatpak Executables (#16)

* 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.
This commit is contained in:
2021-10-28 07:28:24 -05:00
committed by GitHub
parent 107374d93c
commit d3357cb2d9
3 changed files with 41 additions and 9 deletions

View File

@ -17,19 +17,47 @@
## 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 }}"
name: "{{ item.app }}"
remote: flathub
state: present
loop:
- org.libreoffice.LibreOffice
- com.discordapp.Discord
- org.telegram.desktop
- io.lbry.lbry-app
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: