updates+uptimes: Fix cmd assignment.

Signed-off-by: James Antill <james@and.org>
This commit is contained in:
James Antill
2025-12-12 16:05:29 -05:00
parent 16ce599474
commit a3617c3707

View File

@@ -1097,13 +1097,13 @@ def _cmd_remove_old_hosts(args):
remove_old_hosts()
def _cmd_update(args):
cmd = args.cmd
# First remove machines that aren't in inventory anymore, as the playbook
# only adds/updates them.
if cmd != "update-daily-refresh": # Just wastes time if refresh.
remove_old_hosts()
# Now update whatever is left.
cmd = args.cmd
if cmd == "update":
cmd = "update-flush"
if not os.path.exists(fname):