Bugfixes + Update Enhancements (#25)
* Move certbot to be first. * Comment out HTTPS, will use reverse proxy until it is working properly. * Enhance `update` for pacman + pkg * `update` enhancements to pkg and apt. * Add more FS types to ignore. * Add `freebsd-update` commands, including a clean of previous upgrade (VMs are small and need space!). * Add sudo. * Put the directory back for future updates. * Avoid exit code 2 from freebsd-update install. * Remove word Cleanup.
This commit is contained in:
parent
cdfb257b21
commit
3c670b5961
@ -54,11 +54,17 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
update_accept_var: '$accept'
|
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
|
- name: General | Facts | Package | Update Commands | apt
|
||||||
set_fact:
|
set_fact:
|
||||||
update_package_manager: |
|
update_package_manager: |
|
||||||
echo "*** Apt ***" &&
|
echo "*** Apt ***" &&
|
||||||
sudo apt update &&
|
sudo apt update &&
|
||||||
|
sudo apt autoclean {{ update_accept_var }} &&
|
||||||
sudo apt autoremove {{ update_accept_var }} &&
|
sudo apt autoremove {{ update_accept_var }} &&
|
||||||
sudo dpkg --configure -a &&
|
sudo dpkg --configure -a &&
|
||||||
sudo apt --fix-broken --fix-missing install &&
|
sudo apt --fix-broken --fix-missing install &&
|
||||||
@ -69,15 +75,21 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
update_package_manager: |
|
update_package_manager: |
|
||||||
echo "*** Pacman ***" &&
|
echo "*** Pacman ***" &&
|
||||||
sudo pacman -Syyu &&
|
sudo pacman -Syyu {{ update_accept_var }} &&
|
||||||
when: ansible_pkg_mgr == "pacman"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
|
|
||||||
- name: General | Facts | Package | Update Commands | pkg
|
- name: General | Facts | Package | Update Commands | pkg
|
||||||
set_fact:
|
set_fact:
|
||||||
update_package_manager: |
|
update_package_manager: |
|
||||||
|
echo "*** FreeBSD-Update ***" &&
|
||||||
|
sudo sh -c "rm -rfv /var/db/freebsd-update; mkdir -v /var/db/freebsd-update" &&
|
||||||
|
sudo freebsd-update fetch install &&
|
||||||
|
|
||||||
echo "*** Pkg ***" &&
|
echo "*** Pkg ***" &&
|
||||||
sudo pkg update &&
|
sudo pkg update &&
|
||||||
sudo pkg upgrade &&
|
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")
|
when: ansible_pkg_mgr in ("pkg", "pkgng")
|
||||||
|
|
||||||
- name: General | Facts | Package | Update Commands | parrot-upgrade
|
- name: General | Facts | Package | Update Commands | parrot-upgrade
|
||||||
|
10
local.yml
10
local.yml
@ -155,6 +155,11 @@
|
|||||||
- name: Main | Server Setup
|
- name: Main | Server Setup
|
||||||
block:
|
block:
|
||||||
|
|
||||||
|
- include: tasks/server/software/certbot.yml
|
||||||
|
when: certbot == true
|
||||||
|
- include: tasks/server/cron/certbot.yml
|
||||||
|
when: certbot == true
|
||||||
|
|
||||||
- include: tasks/server/software/onlyoffice.yml
|
- include: tasks/server/software/onlyoffice.yml
|
||||||
when: onlyoffice == true and ansible_pkg_mgr == "apt"
|
when: onlyoffice == true and ansible_pkg_mgr == "apt"
|
||||||
|
|
||||||
@ -167,11 +172,6 @@
|
|||||||
- include: tasks/server/software/grafana.yml
|
- include: tasks/server/software/grafana.yml
|
||||||
when: grafana == true and ansible_pkg_mgr == "apt"
|
when: grafana == true and ansible_pkg_mgr == "apt"
|
||||||
|
|
||||||
- include: tasks/server/software/certbot.yml
|
|
||||||
when: certbot == true
|
|
||||||
- include: tasks/server/cron/certbot.yml
|
|
||||||
when: certbot == true
|
|
||||||
|
|
||||||
- include: tasks/server/software/hugo.yml
|
- include: tasks/server/software/hugo.yml
|
||||||
when: hugo == true
|
when: hugo == true
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@
|
|||||||
|
|
||||||
[[inputs.disk]]
|
[[inputs.disk]]
|
||||||
# mount_points = ["/"]
|
# mount_points = ["/"]
|
||||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs", "fdescfs"]
|
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs", "fdescfs", "procfs", "nullfs"]
|
||||||
|
|
||||||
[[inputs.diskio]]
|
[[inputs.diskio]]
|
||||||
# devices = ["sda", "sdb", "vd*"]
|
# devices = ["sda", "sdb", "vd*"]
|
||||||
|
@ -52,19 +52,20 @@
|
|||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
|
||||||
|
# 2022-04-13 Looks like this went live too early, finish commenting it out.
|
||||||
## HTTPS ##
|
## HTTPS ##
|
||||||
# https://helpcenter.only{{ ansible_histname }}.com/installation/docs-community-https-linux.aspx
|
# https://helpcenter.onlyoffice.com/installation/docs-community-https-linux.aspx
|
||||||
|
|
||||||
# Certs #
|
# Certs #
|
||||||
|
|
||||||
- name: Server | OnlyOffice | HTTPS | Check For Cert
|
#- name: Server | OnlyOffice | HTTPS | Check For Cert
|
||||||
shell: "ls -l /etc/letsencrypt/live/{{ ansible_hostname }}.{{ domain }}/{fullchain,privkey}.pem"
|
# shell: "ls -l /etc/letsencrypt/live/{{ ansible_hostname }}.{{ domain }}/{fullchain,privkey}.pem"
|
||||||
register: onlyoffice_cert
|
# register: onlyoffice_cert
|
||||||
|
# ignore_errors: yes
|
||||||
- name: Server | OnlyOffice | HTTPS | Create Cert
|
#
|
||||||
shell: "certbot --nginx -d {{ ansible_hostname }}.{{ domain }}"
|
#- name: Server | OnlyOffice | HTTPS | Create Cert
|
||||||
when: onlyoffice_cert.failed
|
# shell: "certbot --nginx -d {{ ansible_hostname }}.{{ domain }}"
|
||||||
|
# when: onlyoffice_cert.failed
|
||||||
|
|
||||||
# Config #
|
# Config #
|
||||||
|
|
||||||
@ -94,3 +95,4 @@
|
|||||||
service:
|
service:
|
||||||
name: nginx
|
name: nginx
|
||||||
status: reloaded
|
status: reloaded
|
||||||
|
ignore_errors: yes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user