unified info fetching script

This commit is contained in:
Daniel Micay 2023-07-10 23:35:56 -04:00
parent d49deb3db6
commit a957abd347
4 changed files with 20 additions and 48 deletions

20
fetch-info Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
set -o errexit
user=root
. hosts.sh
rm -rf modules packages units
mkdir -p modules packages units
for host in ${hosts_all[@]}; do
(
ssh root@$host lsmod | sort > modules/$host
ssh root@$host pacman -Qqe > packages/$host
ssh root@$host systemctl list-unit-files --state=enabled --state=disabled --state=masked | sort > units/$host
) &
done
wait