env-ansible/facts/general/package.yml

99 lines
3.0 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
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
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"
when: ansible_system == "FreeBSD"
- name: General | Facts | Package | Update Commands | Helpers
set_fact:
update_accept_var: '$accept'
- name: General | Facts | Package | Update Commands | apt
set_fact:
update_package_manager: |
echo "*** Apt ***" &&
sudo apt update &&
sudo apt autoremove {{ 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 ***" &&
sudo pacman -Syyu &&
when: ansible_pkg_mgr == "pacman"
- name: General | Facts | Package | Update Commands | pkg
set_fact:
update_package_manager: |
echo "*** Pkg ***" &&
sudo pkg update &&
sudo pkg upgrade &&
when: ansible_pkg_mgr == "pkg"
- 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 | 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 ***" &&
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