Save Battery Life (#32)
* Added parameters (also made the script more of a program). * Add additional options for unplugged devices. * Allow disabling of cron jobs and lowering of telegraf frequency through new config options. * Fix cron package name. * Fix ssh service name for Ubuntu. * Add output to the options so user knows they were switched. * Prevent some tasks when device is mobile. * Enhance and add to comments. * Add function to check flatpak app disk usage. * Add repair into flatpak commands to help clean disk space of unused apps. * Remove "Done!" output from flatpak-usage. * Go ahead and add function for purging Flatpak apps. * Few more comment changes.
This commit is contained in:
parent
3e05260423
commit
e39aeb20e7
@ -16,6 +16,7 @@
|
|||||||
tar: tar
|
tar: tar
|
||||||
microcode_amd: amd64-microcode
|
microcode_amd: amd64-microcode
|
||||||
microcode_intel: intel-microcode
|
microcode_intel: intel-microcode
|
||||||
|
cron: cron
|
||||||
when: ansible_pkg_mgr == "apt"
|
when: ansible_pkg_mgr == "apt"
|
||||||
|
|
||||||
- name: General | Facts | Package | pacman
|
- name: General | Facts | Package | pacman
|
||||||
@ -26,6 +27,7 @@
|
|||||||
tar: tar
|
tar: tar
|
||||||
microcode_amd: linux-firmware
|
microcode_amd: linux-firmware
|
||||||
microcode_intel: intel-ucode
|
microcode_intel: intel-ucode
|
||||||
|
cron: cronie
|
||||||
when: ansible_pkg_mgr == "pacman"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
|
|
||||||
- name: General | Facts | Package | FreeBSD
|
- name: General | Facts | Package | FreeBSD
|
||||||
@ -47,6 +49,7 @@
|
|||||||
tar: tar
|
tar: tar
|
||||||
microcode_amd: microcode_ctl
|
microcode_amd: microcode_ctl
|
||||||
microcode_intel: microcode_ctl
|
microcode_intel: microcode_ctl
|
||||||
|
cron: cronie
|
||||||
when: ansible_pkg_mgr == "dnf"
|
when: ansible_pkg_mgr == "dnf"
|
||||||
|
|
||||||
|
|
||||||
@ -140,6 +143,7 @@
|
|||||||
update_flatpak: |
|
update_flatpak: |
|
||||||
echo "*** Flatpak ***" &&
|
echo "*** Flatpak ***" &&
|
||||||
sudo flatpak uninstall --unused {{ update_accept_var }} &&
|
sudo flatpak uninstall --unused {{ update_accept_var }} &&
|
||||||
|
sudo flatpak repair &&
|
||||||
sudo flatpak update {{ update_accept_var }} &&
|
sudo flatpak update {{ update_accept_var }} &&
|
||||||
when: flatpak_exec is defined and flatpak_exec.failed is defined and not flatpak_exec.failed
|
when: flatpak_exec is defined and flatpak_exec.failed is defined and not flatpak_exec.failed
|
||||||
|
|
||||||
|
@ -15,8 +15,14 @@
|
|||||||
acpi: acpid
|
acpi: acpid
|
||||||
acpi_pattern: acpid
|
acpi_pattern: acpid
|
||||||
|
|
||||||
- name: General | Facts | Service | Linux
|
- name: General | Facts | Service | Arch Linux
|
||||||
set_fact:
|
set_fact:
|
||||||
crond: cronie
|
crond: cronie
|
||||||
crond_pattern: cronie
|
crond_pattern: cronie
|
||||||
when: ansible_distribution == "Archlinux"
|
when: ansible_distribution == "Archlinux"
|
||||||
|
|
||||||
|
- name: General | Facts | Service | Ubuntu Linux
|
||||||
|
set_fact:
|
||||||
|
sshd: ssh
|
||||||
|
sshd_pattern: ssh
|
||||||
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
@ -66,10 +66,10 @@
|
|||||||
|
|
||||||
# Software Tasks #
|
# Software Tasks #
|
||||||
- include: tasks/workstation/linux/software/flatpaks.yml
|
- include: tasks/workstation/linux/software/flatpaks.yml
|
||||||
when: ansible_system == "Linux" and flatpak_distro
|
when: ansible_system == "Linux" and flatpak_distro and not mobile
|
||||||
|
|
||||||
- include: tasks/workstation/linux/software/brave.yml
|
- include: tasks/workstation/linux/software/brave.yml
|
||||||
when: ansible_pkg_mgr in ("apt", "dnf")
|
when: ansible_pkg_mgr in ("apt", "dnf") and not mobile
|
||||||
|
|
||||||
- include: tasks/workstation/freebsd/software/packages.yml
|
- include: tasks/workstation/freebsd/software/packages.yml
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
||||||
@ -79,9 +79,10 @@
|
|||||||
|
|
||||||
# Configuration Tasks #
|
# Configuration Tasks #
|
||||||
- include: tasks/workstation/shared/settings/gnome.yml
|
- include: tasks/workstation/shared/settings/gnome.yml
|
||||||
|
when: not mobile
|
||||||
|
|
||||||
- include: tasks/workstation/linux/cron/ansible.yml
|
- include: tasks/workstation/linux/cron/ansible.yml
|
||||||
when: ansible_system == "Linux"
|
when: ansible_system == "Linux" and not mobile
|
||||||
|
|
||||||
- include: tasks/workstation/shared/settings/nfs.yml
|
- include: tasks/workstation/shared/settings/nfs.yml
|
||||||
|
|
||||||
|
118
setup.sh
118
setup.sh
@ -1,43 +1,91 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Script to initialize a system into Ansible collection.
|
# Script to initialize a system into Ansible collection.
|
||||||
|
|
||||||
branch="main"
|
## Global Variables ##
|
||||||
if [[ $1 != "" ]]; then
|
|
||||||
branch="$1"
|
PROG=`basename $0`
|
||||||
|
LOCAL=`dirname $0`/local.yml
|
||||||
|
URL="https://github.com/Hyperling/ansible"
|
||||||
|
BRANCH="main"
|
||||||
|
|
||||||
|
## Functions ##
|
||||||
|
|
||||||
|
# Accepts 1 parameter, it is used as the exit status.
|
||||||
|
function usage {
|
||||||
|
cat <<- EOF
|
||||||
|
$PROG [-l] [-b branch_name] [-h]
|
||||||
|
Program to initialize synchronization with Hyperling's Ansible configuration.
|
||||||
|
$URL
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
-l : Run the local version associated with this setup.sh.
|
||||||
|
-b branch_name: Download and run a specific branch. Default is $BRANCH.
|
||||||
|
-h : Display this help text
|
||||||
|
EOF
|
||||||
|
exit $1
|
||||||
|
}
|
||||||
|
|
||||||
|
## Parameter Parsing ##
|
||||||
|
|
||||||
|
while getopts ":lb:h" arg; do
|
||||||
|
case $arg in
|
||||||
|
l)
|
||||||
|
echo "Running $LOCAL as the playbook."
|
||||||
|
local="Y"
|
||||||
|
;;
|
||||||
|
b)
|
||||||
|
echo -n "Using branch "
|
||||||
|
branch="$OPTARG"
|
||||||
|
echo "$branch instead of $BRANCH."
|
||||||
|
;;
|
||||||
|
h)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "ERROR: A parameter was not recognized. Please check your command and try again."
|
||||||
|
usage 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ $branch == "" ]]; then
|
||||||
|
branch="$BRANCH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## Main ##
|
||||||
|
|
||||||
os="$(cat /etc/os-release)"
|
os="$(cat /etc/os-release)"
|
||||||
os="$os $(uname -a)"
|
os="$os $(uname -a)"
|
||||||
|
|
||||||
echo "Making sure all necessary packages are installed..."
|
echo "Making sure all necessary packages are installed..."
|
||||||
if [[ `which ansible > /dev/null; echo $?` != 0 ]]; then
|
if [[ `which ansible > /dev/null; echo $?` != 0 ]]; then
|
||||||
if [[ $os == *Debian* || $os == *Ubuntu* || $os == *"Pop!_OS"* || $os == *Mint* || $os == *Parrot* ]]; then
|
if [[ $os == *Debian* || $os == *Ubuntu* || $os == *"Pop!_OS"* || $os == *Mint* || $os == *Parrot* ]]; then
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y ansible git <<< N
|
sudo apt install -y ansible git <<< N
|
||||||
sudo mkdir -p /etc/ansible
|
sudo mkdir -p /etc/ansible
|
||||||
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
||||||
elif [[ $os == *FreeBSD* ]]; then
|
elif [[ $os == *FreeBSD* ]]; then
|
||||||
sudo pkg install -y py38-ansible git
|
sudo pkg install -y py38-ansible git
|
||||||
sudo mkdir -p /usr/local/etc/ansible
|
sudo mkdir -p /usr/local/etc/ansible
|
||||||
sudo sh -c 'echo "localhost ansible_connection=local" > /usr/local/etc/ansible/hosts'
|
sudo sh -c 'echo "localhost ansible_connection=local" > /usr/local/etc/ansible/hosts'
|
||||||
elif [[ $os == *Arch* || $os == *Manjaro* || $os == *Artix* ]]; then
|
elif [[ $os == *Arch* || $os == *Manjaro* || $os == *Artix* ]]; then
|
||||||
sudo pacman -Sy --noconfirm ansible git
|
sudo pacman -Sy --noconfirm ansible git
|
||||||
sudo mkdir -p /etc/ansible
|
sudo mkdir -p /etc/ansible
|
||||||
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
||||||
elif [[ $os == *Darwin* ]]; then
|
elif [[ $os == *Darwin* ]]; then
|
||||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
echo "TESTING - EXIT!"
|
echo "TESTING - EXIT!"
|
||||||
exit 0
|
exit 0
|
||||||
brew install ansible git
|
brew install ansible git
|
||||||
elif [[ $os == *Fedora* ]]; then
|
elif [[ $os == *Fedora* ]]; then
|
||||||
sudo dnf install -y ansible git python3-libselinux
|
sudo dnf install -y ansible git python3-libselinux
|
||||||
sudo mkdir -p /etc/ansible
|
sudo mkdir -p /etc/ansible
|
||||||
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
||||||
else
|
else
|
||||||
echo -e "ERROR: OS not detected."
|
echo -e "ERROR: OS not detected."
|
||||||
echo -e "$os"
|
echo -e "$os"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "Installed!"
|
echo "Installed!"
|
||||||
|
|
||||||
@ -45,9 +93,13 @@ echo "Installed!"
|
|||||||
#ansible-galaxy collection install community.general
|
#ansible-galaxy collection install community.general
|
||||||
#echo "Added!"
|
#echo "Added!"
|
||||||
|
|
||||||
echo "Running ansible-pull..."
|
echo "Provisioning Ansible..."
|
||||||
sudo ansible-pull -U https://github.com/Hyperling/ansible.git --checkout $branch
|
if [[ $local == "Y" ]]; then
|
||||||
echo "Pulled!"
|
sudo ansible-playbook $LOCAL
|
||||||
|
else
|
||||||
|
sudo ansible-pull -U $URL.git --checkout $branch
|
||||||
|
fi
|
||||||
|
echo "Provisioned!"
|
||||||
|
|
||||||
echo "Mounting all drives..."
|
echo "Mounting all drives..."
|
||||||
mount -a
|
mount -a
|
||||||
|
@ -41,6 +41,13 @@
|
|||||||
;
|
;
|
||||||
; pentesting : Set to true to install tools such as metasploit (nmap is already provided for reporting)
|
; pentesting : Set to true to install tools such as metasploit (nmap is already provided for reporting)
|
||||||
;
|
;
|
||||||
|
; no_telem : Set to true to avoid setting up telemetry services.
|
||||||
|
; Disables GitHub updates to this project.
|
||||||
|
; Disables all telegraf pings.
|
||||||
|
;
|
||||||
|
; battery : Set to true to attempt to save battery life.
|
||||||
|
; Slows down the rate of services such as telegraf and cron.
|
||||||
|
;
|
||||||
[global]
|
[global]
|
||||||
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config'
|
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config'
|
||||||
state: present
|
state: present
|
||||||
@ -54,6 +61,8 @@
|
|||||||
user_desc: "{{ lookup('ini', 'user_desc file={{gen_file}} default=Hyperling') }}"
|
user_desc: "{{ lookup('ini', 'user_desc file={{gen_file}} default=Hyperling') }}"
|
||||||
branch: "{{ lookup('ini', 'branch file={{gen_file}} default=main') }}"
|
branch: "{{ lookup('ini', 'branch file={{gen_file}} default=main') }}"
|
||||||
pentesting: "{{ lookup('ini', 'pentesting file={{gen_file}} default=false') }}"
|
pentesting: "{{ lookup('ini', 'pentesting file={{gen_file}} default=false') }}"
|
||||||
|
no_telem: "{{ lookup('ini', 'no_telem file={{gen_file}} default=false') }}"
|
||||||
|
battery: "{{ lookup('ini', 'battery file={{gen_file}} default=false') }}"
|
||||||
|
|
||||||
- name: General | Account Management | Provisioning Configuration | General | List
|
- name: General | Account Management | Provisioning Configuration | General | List
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -64,6 +73,8 @@
|
|||||||
- { 'user_desc': "{{ user_desc }}" }
|
- { 'user_desc': "{{ user_desc }}" }
|
||||||
- { 'branch': "{{ branch }}" }
|
- { 'branch': "{{ branch }}" }
|
||||||
- { 'pentesting': "{{ pentesting }}" }
|
- { 'pentesting': "{{ pentesting }}" }
|
||||||
|
- { 'no_telem': "{{ no_telem }}" }
|
||||||
|
- { 'battery': "{{ battery }}" }
|
||||||
|
|
||||||
|
|
||||||
## Workstation ##
|
## Workstation ##
|
||||||
@ -91,6 +102,10 @@
|
|||||||
; bsd_gpu : Set to [] to install GPU driver
|
; bsd_gpu : Set to [] to install GPU driver
|
||||||
; Example: amdgpu
|
; Example: amdgpu
|
||||||
;
|
;
|
||||||
|
; mobile : Set to true if not using an amd64 processor.
|
||||||
|
; Not used yet but expecting it to be helpful for Pinephone.
|
||||||
|
; May eventually avoid things like Flatpak if they don't play well.
|
||||||
|
;
|
||||||
[global]
|
[global]
|
||||||
marker: '; {mark} MANAGED BY ANSIBLE | Workstation Config'
|
marker: '; {mark} MANAGED BY ANSIBLE | Workstation Config'
|
||||||
state: present
|
state: present
|
||||||
@ -106,6 +121,7 @@
|
|||||||
rdp: "{{ lookup('ini', 'rdp file={{wrk_file}} default=false') }}"
|
rdp: "{{ lookup('ini', 'rdp file={{wrk_file}} default=false') }}"
|
||||||
vnc: "{{ lookup('ini', 'vnc file={{wrk_file}} default=false') }}"
|
vnc: "{{ lookup('ini', 'vnc file={{wrk_file}} default=false') }}"
|
||||||
bsd_gpu: "{{ lookup('ini', 'bsd_gpu file={{wrk_file}} default=false') }}"
|
bsd_gpu: "{{ lookup('ini', 'bsd_gpu file={{wrk_file}} default=false') }}"
|
||||||
|
mobile: "{{ lookup('ini', 'mobile file={{wrk_file}} default=false') }}"
|
||||||
|
|
||||||
- name: General | Account Management | Provisioning Configuration | Workstation | List
|
- name: General | Account Management | Provisioning Configuration | Workstation | List
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -118,6 +134,7 @@
|
|||||||
- { 'rdp': "{{ rdp }}" }
|
- { 'rdp': "{{ rdp }}" }
|
||||||
- { 'vnc': "{{ vnc }}" }
|
- { 'vnc': "{{ vnc }}" }
|
||||||
- { 'bsd_gpu': "{{ bsd_gpu }}" }
|
- { 'bsd_gpu': "{{ bsd_gpu }}" }
|
||||||
|
- { 'mobile': "{{ mobile }}" }
|
||||||
|
|
||||||
# No longer mining, this is now considered deprecated.
|
# No longer mining, this is now considered deprecated.
|
||||||
### Miner ##
|
### Miner ##
|
||||||
@ -223,6 +240,10 @@
|
|||||||
;
|
;
|
||||||
; certbot : Set to true to add cron job for `certbot renew`.
|
; certbot : Set to true to add cron job for `certbot renew`.
|
||||||
;
|
;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;
|
||||||
|
; Never got these fully working or did not understand how to use them.
|
||||||
|
;
|
||||||
; hugo : Set to true to install HUGO static website generator.
|
; hugo : Set to true to install HUGO static website generator.
|
||||||
;
|
;
|
||||||
; gitlab : ee - Installs Enterprise Edition Free Tier. Basically CE with an easier upgrade path for Paid Features.
|
; gitlab : ee - Installs Enterprise Edition Free Tier. Basically CE with an easier upgrade path for Paid Features.
|
||||||
@ -247,6 +268,7 @@
|
|||||||
; git_sep : Separator for git variables above.
|
; git_sep : Separator for git variables above.
|
||||||
; Example: #
|
; Example: #
|
||||||
;
|
;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
[global]
|
[global]
|
||||||
marker: '; {mark} MANAGED BY ANSIBLE | Server Config'
|
marker: '; {mark} MANAGED BY ANSIBLE | Server Config'
|
||||||
state: present
|
state: present
|
||||||
|
@ -259,6 +259,24 @@
|
|||||||
check-trash --clean
|
check-trash --clean
|
||||||
sudo df -h
|
sudo df -h
|
||||||
}
|
}
|
||||||
|
function_flatpak_usage: |
|
||||||
|
function flatpak-usage() {
|
||||||
|
flatpak list --columns=application | while read app; do
|
||||||
|
size=`flatpak info -s $app 2>/dev/null`
|
||||||
|
if [[ ! -z $size ]]; then
|
||||||
|
mb=$(( size / (1000*1000) ))
|
||||||
|
echo "${mb} MB, $size Bytes, $app"
|
||||||
|
fi
|
||||||
|
done | sort -n
|
||||||
|
}
|
||||||
|
function_flatpak_purge: |
|
||||||
|
function flatpak-purge() {
|
||||||
|
flatpak remove --all --delete-data &&
|
||||||
|
flatpak repair &&
|
||||||
|
echo "Finished purging all Flatpak apps. Executable may still need uninstalled." &&
|
||||||
|
return
|
||||||
|
echo "ERROR: Something went wrong while removing Flatpak apps!"
|
||||||
|
}
|
||||||
|
|
||||||
- name: General | Account Management | Users | Files | Common Variable
|
- name: General | Account Management | Users | Files | Common Variable
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -282,6 +300,8 @@
|
|||||||
{{ edit_config }}
|
{{ edit_config }}
|
||||||
{{ function_check_trash }}
|
{{ function_check_trash }}
|
||||||
{{ function_clean }}
|
{{ function_clean }}
|
||||||
|
{{ function_flatpak_usage }}
|
||||||
|
{{ function_flatpak_purge }}
|
||||||
|
|
||||||
- name: General | Account Management | Users | Files | .bashrc
|
- name: General | Account Management | Users | Files | .bashrc
|
||||||
blockinfile:
|
blockinfile:
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
minute: "*/30"
|
minute: "*/30"
|
||||||
job: "sudo {{ ansible_pull_exec.stdout }} -o -U {{ repo_local }} --checkout {{ branch }}"
|
job: "sudo {{ ansible_pull_exec.stdout }} -o -U {{ repo_local }} --checkout {{ branch }}"
|
||||||
state: present
|
state: present
|
||||||
disabled: no
|
disabled: "{{ 'yes' if no_telem else 'no' }}"
|
||||||
|
|
||||||
- name: General | Cron | Ansible | Create Forced Weekly Subscriber Job
|
- name: General | Cron | Ansible | Create Forced Weekly Subscriber Job
|
||||||
cron:
|
cron:
|
||||||
@ -17,4 +17,4 @@
|
|||||||
special_time: weekly
|
special_time: weekly
|
||||||
job: "{{ user_root.home }}/bin/scm.sh"
|
job: "{{ user_root.home }}/bin/scm.sh"
|
||||||
state: present
|
state: present
|
||||||
disabled: no
|
disabled: "{{ 'yes' if no_telem else 'no' }}"
|
||||||
|
@ -61,11 +61,11 @@
|
|||||||
when: branch == "dev"
|
when: branch == "dev"
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: General | Software | Services | Install CROND (Looking at you, Fedora)
|
- name: General | Software | Services | Install CROND (Looking at you, Fedora+Mobian)
|
||||||
package:
|
package:
|
||||||
name: cronie
|
name: "{{ cron }}"
|
||||||
state: present
|
state: present
|
||||||
when: ansible_pkg_mgr == "dnf"
|
when: ansible_pkg_mgr == "dnf" or ansible_distribution == "Mobian"
|
||||||
|
|
||||||
- name: General | Software | Services | Install killall (Looking at you, Debian)
|
- name: General | Software | Services | Install killall (Looking at you, Debian)
|
||||||
package:
|
package:
|
||||||
@ -77,7 +77,7 @@
|
|||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- which
|
- which
|
||||||
- cronie
|
- "{{ cron }}"
|
||||||
- vi
|
- vi
|
||||||
state: present
|
state: present
|
||||||
when: ansible_distribution == "Archlinux"
|
when: ansible_distribution == "Archlinux"
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
# user = "$USER"
|
# user = "$USER"
|
||||||
|
|
||||||
[agent]
|
[agent]
|
||||||
interval = "5s"
|
interval = "{{ '300s' if battery else '5s' }}"
|
||||||
metric_batch_size = 1000
|
metric_batch_size = 1000
|
||||||
metric_buffer_limit = 10000
|
metric_buffer_limit = 10000
|
||||||
collection_jitter = "0s"
|
collection_jitter = "0s"
|
||||||
@ -168,7 +168,7 @@
|
|||||||
job: "{{ item.command }}"
|
job: "{{ item.command }}"
|
||||||
special_time: "{{ item.freq }}"
|
special_time: "{{ item.freq }}"
|
||||||
state: present
|
state: present
|
||||||
disabled: no
|
disabled: "{{ 'yes' if no_telem else 'no' }}"
|
||||||
loop:
|
loop:
|
||||||
- { "name": "Telegraf Reboot Job" , "freq": "reboot", "command": "{{ telegraf_cmd }}"}
|
- { "name": "Telegraf Reboot Job" , "freq": "reboot", "command": "{{ telegraf_cmd }}"}
|
||||||
- { "name": "Telegraf Keep-Alive Job", "freq": "hourly", "command": "{{ telegraf_watcher }}"}
|
- { "name": "Telegraf Keep-Alive Job", "freq": "hourly", "command": "{{ telegraf_watcher }}"}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
special_time: hourly
|
special_time: hourly
|
||||||
job: "sudo flatpak update --noninteractive"
|
job: "sudo flatpak update --noninteractive"
|
||||||
state: present
|
state: present
|
||||||
disabled: no
|
disabled: "{{ 'yes' if battery else 'no' }}"
|
||||||
when: flatpak_distro
|
when: flatpak_distro
|
||||||
|
|
||||||
- name: General | Cron | Ansible | Linux | Update User Flatpaks
|
- name: General | Cron | Ansible | Linux | Update User Flatpaks
|
||||||
@ -18,5 +18,5 @@
|
|||||||
special_time: hourly
|
special_time: hourly
|
||||||
job: "sudo -u {{ user }} flatpak update --noninteractive"
|
job: "sudo -u {{ user }} flatpak update --noninteractive"
|
||||||
state: present
|
state: present
|
||||||
disabled: no
|
disabled: "{{ 'yes' if battery else 'no' }}"
|
||||||
when: flatpak_distro
|
when: flatpak_distro
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
---
|
---
|
||||||
# Use flatpaks because they're consistent! :)
|
# Use flatpaks because they're consistent versions across different distros! :)
|
||||||
|
|
||||||
|
## To see how much space is taken up try the .rc function flatpak-usage ##
|
||||||
|
|
||||||
|
# If you'd like to remove flatpaks to save space:
|
||||||
|
## Note: This functionality now exists in .rc function flatpak-purge ##
|
||||||
|
# $ flatpak remove --all --delete-data
|
||||||
|
# $ flatpak repair
|
||||||
|
# Then remove, autoremove, and purge flatpak executable with package manager.
|
||||||
|
# Source: https://softhints.com/how-to-completely-remove-flatpak-linux-mint/
|
||||||
|
|
||||||
## Flatpak Pre-reqs ##
|
## Flatpak Pre-reqs ##
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user