Chad
b47183af76
* Signal does seem good after all. * Add alias `here` which shows details of everything in the current location. * Move instant messengers to consistently be at the end of the favorites bar. * Change to single quotes so that the pwd is per-call instead of per-source. * Specify the video codec so that the command works on openSUSE. * Refactor so that there is a shared/common fact list. * Add ffmpeg as a package variable. * Reformat long comment. * New file for installing package manager apps for workstations. * Call the workstation package manager tasks. * Change to parenthesis to look better. * Explicitly add a video flag, add recursive searching, fix a bug with -f ignoring input. * Add ability to "force" the compression, deletes old files and regenerates them. Input is now passed with i rather than f for file/folder. f is now used for force. * Fix skipping the file if it's already compressed. Enhance readability of log text.
180 lines
5.7 KiB
YAML
180 lines
5.7 KiB
YAML
---
|
|
# Define program names for package builtin.
|
|
# This file is for ALL systems and should not include UI components.
|
|
|
|
- name: General | Facts | Packages | Shared Defaults
|
|
set_fact:
|
|
sshfs: sshfs
|
|
tar: tar
|
|
|
|
- name: General | Facts | Packages | Parrot OS Fixes
|
|
set_fact:
|
|
ansible_pkg_mgr: "apt"
|
|
ansible_python_interpreter: "/usr/bin/python3"
|
|
when: ansible_distribution == "Parrot OS"
|
|
|
|
- name: General | Facts | Package | apt
|
|
set_fact:
|
|
locate: locate
|
|
opensshd: openssh-server
|
|
microcode_amd: amd64-microcode
|
|
microcode_intel: intel-microcode
|
|
cron: cron
|
|
when: ansible_pkg_mgr == "apt"
|
|
|
|
- name: General | Facts | Package | pacman
|
|
set_fact:
|
|
locate: mlocate
|
|
opensshd: openssh
|
|
microcode_amd: linux-firmware
|
|
microcode_intel: intel-ucode
|
|
cron: cronie
|
|
when: ansible_pkg_mgr == "pacman"
|
|
|
|
- name: General | Facts | Package | FreeBSD
|
|
set_fact:
|
|
sshfs: fusefs-sshfs
|
|
locate: htop # Placeholder to prevent errors, locate built into FreeBSD.
|
|
opensshd: htop # sshd comes installed on FreeBSD
|
|
ansible_python_interpreter: "/usr/local/bin/python3.8"
|
|
tar: htop # tar already provided in FreeBSD
|
|
microcode_amd: htop # TODO
|
|
microcode_intel: htop # TODO
|
|
when: ansible_system == "FreeBSD"
|
|
|
|
- name: General | Facts | Package | dnf
|
|
set_fact:
|
|
sshfs: fuse-sshfs
|
|
locate: mlocate
|
|
opensshd: openssh
|
|
microcode_amd: microcode_ctl
|
|
microcode_intel: microcode_ctl
|
|
cron: cronie
|
|
when: ansible_pkg_mgr == "dnf"
|
|
|
|
- name: General | Facts | Package | zypper
|
|
set_fact:
|
|
locate: mlocate
|
|
opensshd: openssh
|
|
microcode_amd: ucode-amd
|
|
microcode_intel: ucode-intel
|
|
cron: cronie
|
|
when: ansible_pkg_mgr == "zypper"
|
|
|
|
|
|
- name: General | Facts | Package | Update Commands | Helpers
|
|
set_fact:
|
|
update_accept_var: '$accept'
|
|
|
|
- name: General | Facts | Package | Update Commands | Helpers | pacman
|
|
set_fact:
|
|
update_accept_var: '--noconfirm'
|
|
when: ansible_pkg_mgr == "pacman"
|
|
|
|
- name: General | Facts | Package | Update Commands | apt
|
|
set_fact:
|
|
update_package_manager: |
|
|
echo "*** Apt ***" &&
|
|
sudo apt update &&
|
|
sudo apt autoremove {{ update_accept_var }} &&
|
|
sudo apt clean {{ update_accept_var }} &&
|
|
sudo dpkg --configure -a &&
|
|
sudo apt --fix-broken --fix-missing install &&
|
|
sudo apt dist-upgrade --allow-downgrades --fix-broken --fix-missing {{ update_accept_var }} &&
|
|
when: ansible_pkg_mgr == "apt"
|
|
|
|
- name: General | Facts | Package | Update Commands | pacman
|
|
set_fact:
|
|
update_package_manager: |
|
|
echo "*** Pacman ***"
|
|
if [[ "$accept" == "Y" ]]; then
|
|
auto_accept="{{ update_accept_var }}"
|
|
fi
|
|
sudo pacman -Syyu $auto_accept &&
|
|
when: ansible_pkg_mgr == "pacman"
|
|
|
|
- name: General | Facts | Package | Update Commands | pkg
|
|
set_fact:
|
|
update_package_manager: |
|
|
echo "*** FreeBSD-Update ***"
|
|
clean=""
|
|
[[ "{{ update_accept_var }}" == "-y" ]] || echo "Are you sure you'd like to clean /var/db/freebsd-update? [y/N] "
|
|
[[ "{{ update_accept_var }}" == "-y" ]] || read -N 1 clean
|
|
echo -e "\n"
|
|
typeset -l clean
|
|
if [[ "{{ update_accept_var }}" == "-y" || "$clean" == "y" ]]; then
|
|
echo "Cleaning directory..."
|
|
sudo sh -c "rm -rfv /var/db/freebsd-update; mkdir -v /var/db/freebsd-update"
|
|
fi
|
|
sudo freebsd-update fetch install
|
|
|
|
echo "*** Pkg ***" &&
|
|
sudo pkg update &&
|
|
sudo pkg clean {{ update_accept_var }} &&
|
|
sudo pkg autoremove {{ update_accept_var }} &&
|
|
sudo pkg upgrade {{ update_accept_var }} &&
|
|
when: ansible_pkg_mgr in ("pkg", "pkgng")
|
|
|
|
- name: General | Facts | Package | Update Commands | parrot-upgrade
|
|
set_fact:
|
|
update_package_manager: |
|
|
echo "*** Parrot ***"
|
|
sudo apt update &&
|
|
sudo apt autoremove {{ update_accept_var }} &&
|
|
parrot_mirrors_suck=true &&
|
|
while [[ $parrot_mirrors_suck ]]; do
|
|
unset parrot_mirrors_suck
|
|
sudo parrot-upgrade
|
|
if [[ $? != 0 ]]; then
|
|
parrot_mirrors_suck=true
|
|
sudo apt update --fix-missing
|
|
fi
|
|
done &&
|
|
when: ansible_distribution == "Parrot OS"
|
|
|
|
- name: General | Facts | Package | Update Commands | dnf
|
|
set_fact:
|
|
update_package_manager: |
|
|
echo "*** DNF ***" &&
|
|
sudo dnf clean all {{ update_accept_var }} &&
|
|
sudo dnf autoremove {{ update_accept_var }} &&
|
|
sudo dnf upgrade {{ update_accept_var }} &&
|
|
when: ansible_pkg_mgr in ("dnf")
|
|
|
|
- name: General | Facts | Package | Update Commands | zypper
|
|
set_fact:
|
|
update_package_manager: |
|
|
echo "*** Zypper ***" &&
|
|
sudo zypper refresh &&
|
|
sudo zypper cleanlocks &&
|
|
sudo zypper purge-kernels &&
|
|
sudo zypper clean -a &&
|
|
sudo zypper patch {{ update_accept_var }} &&
|
|
sudo zypper update {{ update_accept_var }} &&
|
|
sudo zypper dist-upgrade {{ update_accept_var }} &&
|
|
# This is a neat feature, but is installing things like GIMP from the
|
|
# repos when it is already installed through Flatpak, so not needed.
|
|
#sudo zypper install-new-recommends &&
|
|
when: ansible_pkg_mgr in ("zypper")
|
|
|
|
|
|
- name: General | Facts | Package | Update Commands | flatpak | check
|
|
shell: which flatpak
|
|
register: flatpak_exec
|
|
ignore_errors: yes
|
|
|
|
- name: General | Facts | Package | Update Commands | flatpak | exists
|
|
set_fact:
|
|
update_flatpak: |
|
|
echo "*** Flatpak ***"
|
|
[[ {{ battery }} != 'True' ]] && sudo flatpak repair
|
|
sudo flatpak uninstall --unused {{ 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
|
|
|
|
- name: General | Facts | Package | Update Commands | flatpak | not exists
|
|
set_fact:
|
|
update_flatpak: |
|
|
echo "*** Flatpak Not Installed ***" &&
|
|
when: update_flatpak is not defined
|