Compare commits

..

No commits in common. "ce6b85bc09d05b476e7b2a70912169fe448f46bf" and "233cf177cd4df1159cd689e889202bf02a68f4c9" have entirely different histories.

4 changed files with 13 additions and 20 deletions

View file

@ -4,7 +4,7 @@
}
authentik.local.cobb.lgbt {
reverse_proxy 10.69.10.50:9000 {
reverse_proxy 10.69.11.52:9000 {
trusted_proxies private_ranges
}
}
@ -18,7 +18,7 @@ pve.local.cobb.lgbt {
}
code.local.cobb.lgbt {
reverse_proxy 10.69.10.52:8443
reverse_proxy 10.69.2.51:8443
}
guac.local.cobb.lgbt {

View file

@ -7,7 +7,7 @@ frigate_rtsp_passwd: !vault |
3561646234623133330a323731336437383438633630393065343363306636343634663162656539
3162
frigate_image_tag: 0.17.0
frigate_reolink_ip: 10.69.12.11
frigate_reolink_ip: 10.69.12.20
frigate_reolink_username: frigate
frigate_reolink_password_url_enc: !vault |
$ANSIBLE_VAULT;1.1;AES256
@ -24,7 +24,7 @@ frigate_reolink_password: !vault |
35376261663933626663376139373262663866633164666234646662346365373936663536316161
3364383165646461350a656366633363366230613430353662393934336132306464663631623865
33343734653131653230373330613731383363306434383865633536313564363166
frigate_mqtt_ip: 10.69.10.199
frigate_mqtt_ip: 10.69.2.13
frigate_mqtt_username: adhdgirl
frigate_mqtt_password: !vault |
$ANSIBLE_VAULT;1.1;AES256

10
update
View file

@ -2,12 +2,4 @@
clear
echo "" > ansible.log
ANSIBLE_PATH=ansible-playbook
if hash ansible-playbook 2>/dev/null; then
ANSIBLE_PATH=ansible-playbook
else
ANSIBLE_PATH=./.venv/bin/ansible-playbook
fi
$ANSIBLE_PATH update.yaml $@
/workspace/dev/ansible/minilab/.venv/bin/ansible-playbook update.yaml $@

View file

@ -9,13 +9,13 @@
ansible.builtin.apt:
upgrade: dist
update_cache: true
when: ansible_facts['distribution'] in debian_derivatives
when: ansible_distribution in debian_derivatives
# This is equivalent to: apk update && apk upgrade
- name: Update cache and upgrade packages
community.general.apk:
upgrade: true
update_cache: true
when: ansible_facts['distribution'] == "Alpine"
when: ansible_distribution == "Alpine"
- name: Check if a reboot is required.
ansible.builtin.stat:
@ -35,7 +35,7 @@
set -o pipefail
apk list linux-lts --installed | awk '{ print $1 }' | sed 's/linux-lts-//' | sed 's/-r/\n/g' | awk '{printf("%s-",$0)}' | awk '{printf("%slts", $0)}'
changed_when: installed_kernel_version != ""
when: ansible_facts['distribution'] == "Alpine"
when: ansible_distribution == "Alpine"
# Set a variable for the currently *running* linux-lts kernel version. We use
# sed to strip off the arch.
- name: Register running linux-lts kernel version
@ -44,7 +44,7 @@
set -o pipefail
uname -r | sed 's/-ARCH//'
changed_when: running_kernel_version != ""
when: ansible_facts['distribution'] == "Alpine"
when: ansible_distribution == "Alpine"
# This is debugging output to tell us when the installed kernel version doesn't
# match the running kernel version. The real magic happens in the following task.
- name: Check installed_kernel_version != running_kernel_version = ???
@ -52,14 +52,15 @@
msg: "{{ installed_kernel_version.stdout }} !=
{{ running_kernel_version.stdout }} =
{{ installed_kernel_version.stdout != running_kernel_version.stdout }}"
when: ansible_facts['distribution'] == "Alpine"
when: ansible_distribution == "Alpine"
# Now compare installed_kernel_version with running_kernel_version. When they
# don't match, this means that we need to reboot. This is not a very sophisticated
# heuristic, but it works.
- name: Reboot if the running kernel version is not the installed kernel version
ansible.builtin.reboot:
reboot_timeout: 30 # These are very simple Alpine servers. They should boot extremely fast.
when: (ansible_facts['distribution'] == "Alpine") and (installed_kernel_version.stdout != running_kernel_version.stdout)
when: (ansible_distribution == "Alpine") and (installed_kernel_version.stdout != running_kernel_version.stdout)
- name: Reboot the server (if required).
ansible.builtin.reboot:
@ -68,4 +69,4 @@
- name: Remove dependencies that are no longer required.
ansible.builtin.apt:
autoremove: true
when: ansible_facts['distribution'] in debian_derivatives
when: ansible_distribution in debian_derivatives