Compare commits

..
2 Commits
Author SHA1 Message Date
oliver 9abed9f2e9 filter hosts 2026-10-13 13:24:58 -03:00
oliver ac65ba2169 working 2026-10-13 13:19:55 -03:00
7 changed files with 25 additions and 11 deletions

No files matched your search

+7 -2
View File
@@ -2,7 +2,12 @@
cmd="$*"
echo "Running on hosts: $cmd"
# Build a temporary hosts file without comments (# ...) and blank lines
tmp_hosts=$(mktemp)
trap 'rm -f "$tmp_hosts"' EXIT
sed -e 's/#.*$//' -e 's/[[:space:]]*$//' -e '/^[[:space:]]*$/d' /app/host_vars/hosts > "$tmp_hosts"
pssh -h /app/host_vars/hosts -t 0 "$cmd"
echo "Running on hosts: $(tr '\n' ' ' < "$tmp_hosts")"
echo "Command: $cmd"
pssh -h "$tmp_hosts" -t 0 "$cmd"
+6 -1
View File
@@ -21,7 +21,12 @@ case "$remotefile" in
esac
# Read hosts from file descriptor 3 to prevent ssh from consuming stdin
while read -r host <&3; do
while read -r host <&3 || [ -n "$host" ]; do
# Strip comments (# ...) and surrounding whitespace; skip empty lines
host="${host%%#*}"
host="${host//[[:space:]]/}"
[ -z "$host" ] && continue
host_env_file="$host_vars_dir/$host/$host.env"
if [ ! -f "$host_env_file" ]; then
+1 -1
View File
@@ -17,7 +17,7 @@ services:
ipv4_address: 10.5.0.200
traefik:
image: docker.io/library/traefik:3.6
image: docker.io/library/traefik:3.7
container_name: traefik
ports:
- 80:80
+2 -3
View File
@@ -1,3 +1,2 @@
https://dl-cdn.alpinelinux.org/alpine/v3.22/main
https://dl-cdn.alpinelinux.org/alpine/v3.22/community
https://dl-cdn.alpinelinux.org/alpine/v3.24/main
https://dl-cdn.alpinelinux.org/alpine/v3.24/community
-4
View File
@@ -1,4 +0,0 @@
rex doas apk update
rex doas apk fix
rex doas apk upgrade
rex doas reboot
+9
View File
@@ -0,0 +1,9 @@
template templates/repositories /etc/apk/repositories
template templates/docker-compose.yml /4server/docker-compose.yml
rex doas apk update
rex doas apk fix
rex doas apk upgrade
rex doas docker compose -f /4server/docker-compose.yml pull
rex doas docker compose -f /4server/docker-compose.yml up -d
rex doas reboot
Binary file not shown.