1
0
Fork 0
forked from infra/ansible

updates-uptimes: Fix diff vs. older backups, also add mass upgrade comments.

Signed-off-by: James Antill <james@and.org>
This commit is contained in:
James Antill 2025-08-05 15:21:04 -04:00
commit f252273413
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,11 @@
---
# Note that someone probably wants to run:
# ansible -m shell -a 'dnf --refresh -y update; rkhunter --propupd' all:!copr*:!openqa*:!ocp*:!worker*'
# ...during an outage. Note that doing more than one vmhost at once isn't
# easily safe, because some vmhost will want another to be up while they reboot.
# Also:
# ansible -m shell -a 'dnf --refresh -y update; rkhunter --propupd' staging:!copr*:!openqa*:!ocp*:!worker*'
# could be used for staging, but it's not that big.
- import_playbook: /srv/web/infra/ansible/playbooks/vhost_update.yml
- import_playbook: /srv/web/infra/ansible/playbooks/vhost_reboot.yml

View file

@ -351,9 +351,9 @@ if cmd in ("diff", "diff-u"):
fn1 = fname + '.' + cmp
fn2 = fname
data1 = fname2lines(fn1)
if len(sys.argv) >= 2 and sys.argv[1] in backups:
if len(sys.argv) >= 3 and sys.argv[2] in backups:
# Doing a diff. between two backups...
fn2 = fname + '.' + sys.argv[1]
fn2 = fname + '.' + sys.argv[2]
data2 = fname2lines(fn2)
print("diff %s %s" % (fn1, fn2), file=sys.stderr)
_max_update(data1)