2020-12-28 20:06:41 -06:00
|
|
|
---
|
2021-02-03 21:17:48 -06:00
|
|
|
# Define program names for package builtin.
|
2021-02-02 20:44:31 -06:00
|
|
|
# This file is for ALL systems and should not include UI components.
|
2020-12-28 20:06:41 -06:00
|
|
|
|
2021-07-11 10:59:42 -05:00
|
|
|
- name: General | Facts | Packages | Parrot OS Fixes
|
2021-07-11 08:27:00 -05:00
|
|
|
set_fact:
|
|
|
|
ansible_pkg_mgr: "apt"
|
2021-07-11 10:59:42 -05:00
|
|
|
ansible_python_interpreter: "/usr/bin/python3"
|
2021-07-11 08:27:00 -05:00
|
|
|
when: ansible_distribution == "Parrot OS"
|
|
|
|
|
2021-02-06 17:00:55 -06:00
|
|
|
- name: General | Facts | Package | apt
|
2021-01-31 17:10:39 -06:00
|
|
|
set_fact:
|
2021-01-31 13:02:29 -06:00
|
|
|
sshfs: sshfs
|
2021-02-02 20:27:15 -06:00
|
|
|
locate: locate
|
2021-02-15 08:40:32 -06:00
|
|
|
opensshd: openssh-server
|
2022-01-10 13:41:54 +00:00
|
|
|
tar: tar
|
2022-03-27 08:14:06 -05:00
|
|
|
microcode_amd: amd64-microcode
|
|
|
|
microcode_intel: intel-microcode
|
2022-12-03 15:28:29 -06:00
|
|
|
cron: cron
|
2021-07-11 08:00:03 -05:00
|
|
|
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
|
2022-01-10 13:41:54 +00:00
|
|
|
tar: tar
|
2022-03-27 08:14:06 -05:00
|
|
|
microcode_amd: linux-firmware
|
|
|
|
microcode_intel: intel-ucode
|
2022-12-03 15:28:29 -06:00
|
|
|
cron: cronie
|
2021-02-14 07:22:29 -06:00
|
|
|
when: ansible_pkg_mgr == "pacman"
|
2020-12-28 20:06:41 -06:00
|
|
|
|
2021-02-06 17:00:55 -06:00
|
|
|
- name: General | Facts | Package | FreeBSD
|
2021-01-31 17:10:39 -06:00
|
|
|
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"
|
2022-01-10 13:41:54 +00:00
|
|
|
tar: htop # tar already provided in FreeBSD
|
2022-03-27 08:14:06 -05:00
|
|
|
microcode_amd: htop # TODO
|
|
|
|
microcode_intel: htop # TODO
|
2021-07-10 08:17:56 -05:00
|
|
|
when: ansible_system == "FreeBSD"
|
2021-07-11 08:00:03 -05:00
|
|
|
|
2021-11-07 12:40:31 -06:00
|
|
|
- name: General | Facts | Package | dnf
|
|
|
|
set_fact:
|
|
|
|
sshfs: fuse-sshfs
|
|
|
|
locate: mlocate
|
|
|
|
opensshd: openssh
|
2022-01-10 13:41:54 +00:00
|
|
|
tar: tar
|
2022-03-27 08:14:06 -05:00
|
|
|
microcode_amd: microcode_ctl
|
|
|
|
microcode_intel: microcode_ctl
|
2022-12-03 15:28:29 -06:00
|
|
|
cron: cronie
|
2021-11-07 12:40:31 -06:00
|
|
|
when: ansible_pkg_mgr == "dnf"
|
|
|
|
|
2023-02-18 09:29:36 -06:00
|
|
|
- name: General | Facts | Package | zypper
|
|
|
|
set_fact:
|
|
|
|
sshfs: sshfs
|
|
|
|
locate: mlocate
|
|
|
|
opensshd: openssh
|
|
|
|
tar: tar
|
|
|
|
microcode_amd: ucode-amd
|
|
|
|
microcode_intel: ucode-intel
|
2023-02-19 10:04:10 -06:00
|
|
|
cron: cronie
|
2023-02-18 09:29:36 -06:00
|
|
|
when: ansible_pkg_mgr == "zypper"
|
|
|
|
|
2021-08-14 10:03:55 -05:00
|
|
|
|
|
|
|
- name: General | Facts | Package | Update Commands | Helpers
|
|
|
|
set_fact:
|
|
|
|
update_accept_var: '$accept'
|
|
|
|
|
2022-04-16 08:07:53 -05:00
|
|
|
- name: General | Facts | Package | Update Commands | Helpers | pacman
|
|
|
|
set_fact:
|
|
|
|
update_accept_var: '--noconfirm'
|
|
|
|
when: ansible_pkg_mgr == "pacman"
|
|
|
|
|
2021-08-14 10:03:55 -05:00
|
|
|
- name: General | Facts | Package | Update Commands | apt
|
|
|
|
set_fact:
|
|
|
|
update_package_manager: |
|
|
|
|
echo "*** Apt ***" &&
|
|
|
|
sudo apt update &&
|
|
|
|
sudo apt autoremove {{ update_accept_var }} &&
|
2023-02-18 09:29:36 -06:00
|
|
|
sudo apt clean {{ update_accept_var }} &&
|
2021-08-16 18:04:58 -05:00
|
|
|
sudo dpkg --configure -a &&
|
|
|
|
sudo apt --fix-broken --fix-missing install &&
|
|
|
|
sudo apt dist-upgrade --allow-downgrades --fix-broken --fix-missing {{ update_accept_var }} &&
|
2021-08-14 10:03:55 -05:00
|
|
|
when: ansible_pkg_mgr == "apt"
|
|
|
|
|
|
|
|
- name: General | Facts | Package | Update Commands | pacman
|
|
|
|
set_fact:
|
|
|
|
update_package_manager: |
|
2022-05-22 06:23:28 -05:00
|
|
|
echo "*** Pacman ***"
|
|
|
|
if [[ "$accept" == "Y" ]]; then
|
|
|
|
auto_accept="{{ update_accept_var }}"
|
|
|
|
fi
|
|
|
|
sudo pacman -Syyu $auto_accept &&
|
2021-08-14 10:03:55 -05:00
|
|
|
when: ansible_pkg_mgr == "pacman"
|
|
|
|
|
|
|
|
- name: General | Facts | Package | Update Commands | pkg
|
|
|
|
set_fact:
|
|
|
|
update_package_manager: |
|
2022-04-25 07:06:14 -05:00
|
|
|
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
|
2022-05-22 06:23:28 -05:00
|
|
|
echo -e "\n"
|
2022-04-25 07:06:14 -05:00
|
|
|
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
|
2022-04-16 08:07:53 -05:00
|
|
|
|
2021-08-14 10:03:55 -05:00
|
|
|
echo "*** Pkg ***" &&
|
|
|
|
sudo pkg update &&
|
2022-04-16 08:07:53 -05:00
|
|
|
sudo pkg clean {{ update_accept_var }} &&
|
|
|
|
sudo pkg autoremove {{ update_accept_var }} &&
|
|
|
|
sudo pkg upgrade {{ update_accept_var }} &&
|
2021-10-18 07:13:49 -05:00
|
|
|
when: ansible_pkg_mgr in ("pkg", "pkgng")
|
2021-08-14 10:03:55 -05:00
|
|
|
|
|
|
|
- name: General | Facts | Package | Update Commands | parrot-upgrade
|
|
|
|
set_fact:
|
|
|
|
update_package_manager: |
|
|
|
|
echo "*** Parrot ***"
|
2021-08-16 18:04:58 -05:00
|
|
|
sudo apt update &&
|
|
|
|
sudo apt autoremove {{ update_accept_var }} &&
|
|
|
|
parrot_mirrors_suck=true &&
|
2021-08-14 10:03:55 -05:00
|
|
|
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
|
2021-08-14 12:43:42 -05:00
|
|
|
done &&
|
2021-08-14 10:03:55 -05:00
|
|
|
when: ansible_distribution == "Parrot OS"
|
|
|
|
|
2021-11-07 12:40:31 -06:00
|
|
|
- name: General | Facts | Package | Update Commands | dnf
|
|
|
|
set_fact:
|
|
|
|
update_package_manager: |
|
|
|
|
echo "*** DNF ***" &&
|
2022-04-25 07:06:14 -05:00
|
|
|
sudo dnf clean all {{ update_accept_var }} &&
|
|
|
|
sudo dnf autoremove {{ update_accept_var }} &&
|
2021-11-07 12:40:31 -06:00
|
|
|
sudo dnf upgrade {{ update_accept_var }} &&
|
|
|
|
when: ansible_pkg_mgr in ("dnf")
|
|
|
|
|
2023-02-18 09:29:36 -06:00
|
|
|
- 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")
|
|
|
|
|
2021-08-14 12:43:42 -05:00
|
|
|
|
|
|
|
- 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
|
2021-08-14 10:03:55 -05:00
|
|
|
set_fact:
|
|
|
|
update_flatpak: |
|
2023-02-20 07:20:04 -06:00
|
|
|
echo "*** Flatpak ***"
|
|
|
|
[[ {{ battery }} != 'True' ]] && sudo flatpak repair
|
2022-04-25 07:06:14 -05:00
|
|
|
sudo flatpak uninstall --unused {{ update_accept_var }} &&
|
2021-10-09 14:13:48 -05:00
|
|
|
sudo flatpak update {{ update_accept_var }} &&
|
2021-08-14 12:43:42 -05:00
|
|
|
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
|
2021-08-14 10:03:55 -05:00
|
|
|
set_fact:
|
2021-08-14 12:43:42 -05:00
|
|
|
update_flatpak: |
|
|
|
|
echo "*** Flatpak Not Installed ***" &&
|
|
|
|
when: update_flatpak is not defined
|