Compare commits
2 commits
233cf177cd
...
ce6b85bc09
| Author | SHA1 | Date | |
|---|---|---|---|
| ce6b85bc09 | |||
| d9a2345dab |
4 changed files with 20 additions and 13 deletions
|
|
@ -4,7 +4,7 @@
|
|||
}
|
||||
|
||||
authentik.local.cobb.lgbt {
|
||||
reverse_proxy 10.69.11.52:9000 {
|
||||
reverse_proxy 10.69.10.50:9000 {
|
||||
trusted_proxies private_ranges
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ pve.local.cobb.lgbt {
|
|||
}
|
||||
|
||||
code.local.cobb.lgbt {
|
||||
reverse_proxy 10.69.2.51:8443
|
||||
reverse_proxy 10.69.10.52:8443
|
||||
}
|
||||
|
||||
guac.local.cobb.lgbt {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ frigate_rtsp_passwd: !vault |
|
|||
3561646234623133330a323731336437383438633630393065343363306636343634663162656539
|
||||
3162
|
||||
frigate_image_tag: 0.17.0
|
||||
frigate_reolink_ip: 10.69.12.20
|
||||
frigate_reolink_ip: 10.69.12.11
|
||||
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.2.13
|
||||
frigate_mqtt_ip: 10.69.10.199
|
||||
frigate_mqtt_username: adhdgirl
|
||||
frigate_mqtt_password: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
|
|
|
|||
10
update
10
update
|
|
@ -2,4 +2,12 @@
|
|||
|
||||
clear
|
||||
echo "" > ansible.log
|
||||
/workspace/dev/ansible/minilab/.venv/bin/ansible-playbook update.yaml $@
|
||||
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 $@
|
||||
|
|
|
|||
15
update.yaml
15
update.yaml
|
|
@ -9,13 +9,13 @@
|
|||
ansible.builtin.apt:
|
||||
upgrade: dist
|
||||
update_cache: true
|
||||
when: ansible_distribution in debian_derivatives
|
||||
when: ansible_facts['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_distribution == "Alpine"
|
||||
when: ansible_facts['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_distribution == "Alpine"
|
||||
when: ansible_facts['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_distribution == "Alpine"
|
||||
when: ansible_facts['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,15 +52,14 @@
|
|||
msg: "{{ installed_kernel_version.stdout }} !=
|
||||
{{ running_kernel_version.stdout }} =
|
||||
{{ installed_kernel_version.stdout != running_kernel_version.stdout }}"
|
||||
when: ansible_distribution == "Alpine"
|
||||
when: ansible_facts['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_distribution == "Alpine") and (installed_kernel_version.stdout != running_kernel_version.stdout)
|
||||
|
||||
when: (ansible_facts['distribution'] == "Alpine") and (installed_kernel_version.stdout != running_kernel_version.stdout)
|
||||
|
||||
- name: Reboot the server (if required).
|
||||
ansible.builtin.reboot:
|
||||
|
|
@ -69,4 +68,4 @@
|
|||
- name: Remove dependencies that are no longer required.
|
||||
ansible.builtin.apt:
|
||||
autoremove: true
|
||||
when: ansible_distribution in debian_derivatives
|
||||
when: ansible_facts['distribution'] in debian_derivatives
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue