1
0
Fork 0
forked from infra/ansible
ansible/scripts/maint-update-reboot.sh
James Antill 5c6868260b Merge branch 'nftables' into upstream
* nftables: (2 commits)
  Cleanup nft merge. Chg osbuildapi and nft_custom_rules to use nft_table_filter.
  ...

Signed-off-by: James Antill <james@and.org>
2026-06-01 17:33:24 -04:00

16 lines
333 B
Bash
Executable file

#! /bin/sh -e
for host in $(ansible maintainer_test --list-host | tail -n +2); do
echo " ======== Host: $host ========"
ssh "$host" dnf --refresh -y up
if [ "$(ssh $host who | wc -l)" = "1" ]; then
ansible -m reboot "$host"
ssh "$host" rkhunter --propupd || true
else
echo " ** Skipping reboot as Users on: $host"
fi
done