env-ansible/facts/general/package.yml

182 lines
5.8 KiB
YAML
Raw Normal View History

2020-12-28 20:06:41 -06:00
---
# Define program names for package builtin.
# This file is for ALL systems and should not include UI components.
2020-12-28 20:06:41 -06:00
- 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:
2021-01-31 13:02:29 -06:00
sshfs: sshfs
locate: locate
2021-02-15 08:40:32 -06:00
opensshd: openssh-server
tar: tar
microcode_amd: amd64-microcode
microcode_intel: intel-microcode
cron: cron
when: ansible_pkg_mgr == "apt"
2021-02-14 07:22:29 -06:00
- name: General | Facts | Package | pacman
set_fact:
sshfs: sshfs
locate: mlocate
2021-02-15 08:40:32 -06:00
opensshd: openssh
tar: tar
microcode_amd: linux-firmware
microcode_intel: intel-ucode
cron: cronie
2021-02-14 07:22:29 -06:00
when: ansible_pkg_mgr == "pacman"
2020-12-28 20:06:41 -06:00
- name: General | Facts | Package | FreeBSD
set_fact:
2021-01-31 13:02:29 -06:00
sshfs: fusefs-sshfs
2021-02-15 08:29:20 -06:00
locate: htop # Placeholder to prevent errors, locate built into FreeBSD.
2021-02-15 08:43:47 -06:00
opensshd: htop # sshd comes installed on FreeBSD
Add initial HUGO support, FreeBSD 13 support, and script for Ansible to hit dev branch. (#4) * Create HUGO file. * Add HUGO. * Add script for running system against development branch. * Add newline to end of file. * Comment unused blocks. * Add path of site that HUGO should host. * Newlines, comments, and HUGO path. (#2) (#3) * Create HUGO file. * Add HUGO. * Add script for running system against development branch. * Add newline to end of file. * Comment unused blocks. * Add path of site that HUGO should host. * FreeBSD is complaining about certbot not having dict object stdout. This whole playbook is supposed to be skipped though, lol. * FreeBSD 13 is still mad. Ansible 2.11.2, jinja 2.11.2 (same version number??), Python 3.8.10. * Fix root group to be existing variable. FreeBSD uses wheel. * Allow choosing Github branch dynamically. * `branch` needs to be at General level. Testing if this works... * Change other `localhost` to `everything`. * Update FreeBSD status. * Goodbye, Code-OSS on Linux! * Delete a terrible file. * Remove excess tag. * "Fix" SSHFS for FreeBSD. * Variablize FreeBSD's loading of fusefs. * Variablize /etc/rc.conf. Enable FuseFS more properly. * Add beginning ticks. * Add missing playbook. * Enable FreeBSD mount job. * Rearrange items to be more consistent with comment. * It seems FreeBSD removed the `gnome3` metapackage. Use `gnome3-lite` instead. Also add Telegram. * Python is to 3.8 now. * Expand on FreeBSD work. * Expand on FreeBSD work. * Add placeholders for Gitlab. * Add parameter for Gitlab install. * Add Gitlab playbook. * Ensure FreeBSD uses the correct Python install. * Add newline. * Fix NFS for FreeBSD workstations. * Remove unnecessary line, restricted install to Linux in playbook. * Fix mount options for FreeBSD. * Fix mount number, as well as system-specific facts. * Add placeholders for remote viewing. * Add RDP for FreeBSD. * Omg! It works! Add setting enforcement. * Always remove OSS. * Remove hosts from explicit dev testing.
2021-07-19 07:07:03 -05:00
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"
General Release (#17) * 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. * Add alias goodbye/bye, modify alias names for initializing program and video projects. * Add newline. * Add content to file to remove warning. * Use arrays for Flatpak sections. Create executable files for them. * Move sudoer files into shared folder. * First stab at automating a GitLab install. * First stab at automating DWM install. * Fix 'usr' typo. * Lowercase dwm. * Fix config play. Install font-awesome. * Add placeholder. * Add dmenu and st. * Fix typo. Hopefully also fixes ~/bin executables. * Add Signal. Remove Discord. * Remove extra line. * Add newline. * Move dbus-launch to correct app. * Fix clock minutes. * Add server for GitLab. * Change check, package was not registering anything. * Change success to failed. * Change to http. Will use reverse proxy. * Remove useless sudo. Go ahead and allow postfix to be installed. * Fix debug option "var". * Only give the out lines. Remove exit, doesn't stop the job. * Add a few games and test them on dell-laptop. * Ignore Lutris errors, Rolling Rhino doesn't like the PPA. ;) * Add goodbye for updating then quitting. * Add airbook to gaming. * Add dnf. * Fix missing underscores. * Install cronie on Fedora. * Beginning to add Fedora. * Add Fedora values. * Make font-awesome optional since it may need installed manually on some systems. * Fix typo in ignore_errors. * Allow DWM to fail, won't work for all workstations. Fedora doesn't have X11 headers. * Most dists are using python3-psutil for the psutil package name. Make it the default. * Fix firefox_esr variable. * More Fedora support. * Move installation of cron to more applicable task list. * Fic nfs-utils typo. * The font is honestly pretty important. ;) * Add Librewolf for testing vs Brave. * For some reason the other link didn't work for Fedora, add the one from flatpak's instructions. * Fedora status update. * Add games to Inspiron. * LibreWolf is amazing. Use it as default if available. * Use English rather than code for `and` and `or`. * Always have LibreWolf pinned if it's available. Brave should still be the main browser for URL-clicking compatibility. * Fix comma. * Add entry for testing Fedora Gitlab server. * Attempt to automate more of the Gitlab setup, especially the part of being behind a reverse proxy. Also add Fedora family support. * Specify the package managers for Gitlab. * Add missing bracket. * Add another missing bracket. * Fix gitlab's when clause. * Another fix for the gitlab when. * Change original gitlab install to be Community Edition. * Fix mgr typo. Create config file if it doesn't exist. * Remove duplicate `when` on Lutris uninstall. * Gitlab script gets a packagecloud.io error for Fedora. Looks like only CentOS and its derivatives are supported. * Update status of Fedora.
2021-11-07 12:40:31 -06:00
- name: General | Facts | Package | dnf
set_fact:
sshfs: fuse-sshfs
locate: mlocate
opensshd: openssh
tar: tar
microcode_amd: microcode_ctl
microcode_intel: microcode_ctl
cron: cronie
General Release (#17) * 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. * Add alias goodbye/bye, modify alias names for initializing program and video projects. * Add newline. * Add content to file to remove warning. * Use arrays for Flatpak sections. Create executable files for them. * Move sudoer files into shared folder. * First stab at automating a GitLab install. * First stab at automating DWM install. * Fix 'usr' typo. * Lowercase dwm. * Fix config play. Install font-awesome. * Add placeholder. * Add dmenu and st. * Fix typo. Hopefully also fixes ~/bin executables. * Add Signal. Remove Discord. * Remove extra line. * Add newline. * Move dbus-launch to correct app. * Fix clock minutes. * Add server for GitLab. * Change check, package was not registering anything. * Change success to failed. * Change to http. Will use reverse proxy. * Remove useless sudo. Go ahead and allow postfix to be installed. * Fix debug option "var". * Only give the out lines. Remove exit, doesn't stop the job. * Add a few games and test them on dell-laptop. * Ignore Lutris errors, Rolling Rhino doesn't like the PPA. ;) * Add goodbye for updating then quitting. * Add airbook to gaming. * Add dnf. * Fix missing underscores. * Install cronie on Fedora. * Beginning to add Fedora. * Add Fedora values. * Make font-awesome optional since it may need installed manually on some systems. * Fix typo in ignore_errors. * Allow DWM to fail, won't work for all workstations. Fedora doesn't have X11 headers. * Most dists are using python3-psutil for the psutil package name. Make it the default. * Fix firefox_esr variable. * More Fedora support. * Move installation of cron to more applicable task list. * Fic nfs-utils typo. * The font is honestly pretty important. ;) * Add Librewolf for testing vs Brave. * For some reason the other link didn't work for Fedora, add the one from flatpak's instructions. * Fedora status update. * Add games to Inspiron. * LibreWolf is amazing. Use it as default if available. * Use English rather than code for `and` and `or`. * Always have LibreWolf pinned if it's available. Brave should still be the main browser for URL-clicking compatibility. * Fix comma. * Add entry for testing Fedora Gitlab server. * Attempt to automate more of the Gitlab setup, especially the part of being behind a reverse proxy. Also add Fedora family support. * Specify the package managers for Gitlab. * Add missing bracket. * Add another missing bracket. * Fix gitlab's when clause. * Another fix for the gitlab when. * Change original gitlab install to be Community Edition. * Fix mgr typo. Create config file if it doesn't exist. * Remove duplicate `when` on Lutris uninstall. * Gitlab script gets a packagecloud.io error for Fedora. Looks like only CentOS and its derivatives are supported. * Update status of Fedora.
2021-11-07 12:40:31 -06:00
when: ansible_pkg_mgr == "dnf"
- name: General | Facts | Package | zypper
set_fact:
sshfs: sshfs
locate: mlocate
opensshd: openssh
tar: tar
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"
General Release (#17) * 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. * Add alias goodbye/bye, modify alias names for initializing program and video projects. * Add newline. * Add content to file to remove warning. * Use arrays for Flatpak sections. Create executable files for them. * Move sudoer files into shared folder. * First stab at automating a GitLab install. * First stab at automating DWM install. * Fix 'usr' typo. * Lowercase dwm. * Fix config play. Install font-awesome. * Add placeholder. * Add dmenu and st. * Fix typo. Hopefully also fixes ~/bin executables. * Add Signal. Remove Discord. * Remove extra line. * Add newline. * Move dbus-launch to correct app. * Fix clock minutes. * Add server for GitLab. * Change check, package was not registering anything. * Change success to failed. * Change to http. Will use reverse proxy. * Remove useless sudo. Go ahead and allow postfix to be installed. * Fix debug option "var". * Only give the out lines. Remove exit, doesn't stop the job. * Add a few games and test them on dell-laptop. * Ignore Lutris errors, Rolling Rhino doesn't like the PPA. ;) * Add goodbye for updating then quitting. * Add airbook to gaming. * Add dnf. * Fix missing underscores. * Install cronie on Fedora. * Beginning to add Fedora. * Add Fedora values. * Make font-awesome optional since it may need installed manually on some systems. * Fix typo in ignore_errors. * Allow DWM to fail, won't work for all workstations. Fedora doesn't have X11 headers. * Most dists are using python3-psutil for the psutil package name. Make it the default. * Fix firefox_esr variable. * More Fedora support. * Move installation of cron to more applicable task list. * Fic nfs-utils typo. * The font is honestly pretty important. ;) * Add Librewolf for testing vs Brave. * For some reason the other link didn't work for Fedora, add the one from flatpak's instructions. * Fedora status update. * Add games to Inspiron. * LibreWolf is amazing. Use it as default if available. * Use English rather than code for `and` and `or`. * Always have LibreWolf pinned if it's available. Brave should still be the main browser for URL-clicking compatibility. * Fix comma. * Add entry for testing Fedora Gitlab server. * Attempt to automate more of the Gitlab setup, especially the part of being behind a reverse proxy. Also add Fedora family support. * Specify the package managers for Gitlab. * Add missing bracket. * Add another missing bracket. * Fix gitlab's when clause. * Another fix for the gitlab when. * Change original gitlab install to be Community Edition. * Fix mgr typo. Create config file if it doesn't exist. * Remove duplicate `when` on Lutris uninstall. * Gitlab script gets a packagecloud.io error for Fedora. Looks like only CentOS and its derivatives are supported. * Update status of Fedora.
2021-11-07 12:40:31 -06:00
- 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 }} &&
General Release (#17) * 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. * Add alias goodbye/bye, modify alias names for initializing program and video projects. * Add newline. * Add content to file to remove warning. * Use arrays for Flatpak sections. Create executable files for them. * Move sudoer files into shared folder. * First stab at automating a GitLab install. * First stab at automating DWM install. * Fix 'usr' typo. * Lowercase dwm. * Fix config play. Install font-awesome. * Add placeholder. * Add dmenu and st. * Fix typo. Hopefully also fixes ~/bin executables. * Add Signal. Remove Discord. * Remove extra line. * Add newline. * Move dbus-launch to correct app. * Fix clock minutes. * Add server for GitLab. * Change check, package was not registering anything. * Change success to failed. * Change to http. Will use reverse proxy. * Remove useless sudo. Go ahead and allow postfix to be installed. * Fix debug option "var". * Only give the out lines. Remove exit, doesn't stop the job. * Add a few games and test them on dell-laptop. * Ignore Lutris errors, Rolling Rhino doesn't like the PPA. ;) * Add goodbye for updating then quitting. * Add airbook to gaming. * Add dnf. * Fix missing underscores. * Install cronie on Fedora. * Beginning to add Fedora. * Add Fedora values. * Make font-awesome optional since it may need installed manually on some systems. * Fix typo in ignore_errors. * Allow DWM to fail, won't work for all workstations. Fedora doesn't have X11 headers. * Most dists are using python3-psutil for the psutil package name. Make it the default. * Fix firefox_esr variable. * More Fedora support. * Move installation of cron to more applicable task list. * Fic nfs-utils typo. * The font is honestly pretty important. ;) * Add Librewolf for testing vs Brave. * For some reason the other link didn't work for Fedora, add the one from flatpak's instructions. * Fedora status update. * Add games to Inspiron. * LibreWolf is amazing. Use it as default if available. * Use English rather than code for `and` and `or`. * Always have LibreWolf pinned if it's available. Brave should still be the main browser for URL-clicking compatibility. * Fix comma. * Add entry for testing Fedora Gitlab server. * Attempt to automate more of the Gitlab setup, especially the part of being behind a reverse proxy. Also add Fedora family support. * Specify the package managers for Gitlab. * Add missing bracket. * Add another missing bracket. * Fix gitlab's when clause. * Another fix for the gitlab when. * Change original gitlab install to be Community Edition. * Fix mgr typo. Create config file if it doesn't exist. * Remove duplicate `when` on Lutris uninstall. * Gitlab script gets a packagecloud.io error for Fedora. Looks like only CentOS and its derivatives are supported. * Update status of Fedora.
2021-11-07 12:40:31 -06:00
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