ansible/roles/basic_common_settings/templates/update.sh.j2
2022-12-14 17:43:16 +01:00

23 lines
593 B
Django/Jinja
Executable file

#!/bin/sh
{% if ansible_os_family == "Debian" %}
export DEBIAN_FRONTEND=noninteractive
apt update
apt upgrade -y
apt autoremove -y
apt clean
{% endif %}
{% if ansible_os_family == "FreeBSD" %}
freebsd-update fetch
freebsd-update install
pkg upgrade
# Upgrades the Release to the latest updates
pkg-static install -f pkg
pkg bootstrap -f
pkg update
pkg upgrade
# Updates all packages
# Following this How To: https://www.cyberciti.biz/open-source/freebsd-13-released-how-to-update-upgrade-freebsd-12-to-13/
{% endif %}
{% if ansible_os_family == "OpenBSD" %}
pkg_add -u && syspatch
{% endif %}