Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2024-02-23 06:28:08 +01:00
parent f2a7b35ce3
commit aaf31ca02d
No known key found for this signature in database
GPG key ID: 31584CFEB9BF64AD
2 changed files with 5 additions and 3 deletions

View file

@ -102,7 +102,7 @@
app: mirrormanager
secret_name: ssh-mirrorlist-proxies-key
key: ssh_mirrorlist_proxies.key
privatefile: "mirrormanager/id_rsa.pub"
privatefile: "mirrormanager/id_rsa"
# Deployment config
- role: openshift/object

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
MIRRORLIST_PROXIES="{% for host in groups['mirrorlist_proxies'] %} {{ host }} {% endfor %}"
@ -7,12 +7,14 @@ MIRRORLIST_LOGFILES="mirrorlist1.service.log mirrorlist2.service.log"
SSH_KEY="/etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key"
REMOTE_USER="mirrormanager"
SSH="ssh -i ${SSH_KEY} -o 'StrictHostKeyChecking no' -o 'BatchMode yes'"
SSH="ssh -i ${SSH_KEY} -o StrictHostKeyChecking=no -o BatchMode=yes"
DATE=`date +%Y%m%d`
OUTPUT=`mktemp -d`
trap "rm -f ${OUTPUT}/*; rmdir ${OUTPUT}" QUIT TERM INT HUP EXIT
set -x
for proxy in ${MIRRORLIST_PROXIES}; do
if [ "$1" == "yesterday" ]; then
for logfile in ${MIRRORLIST_LOGFILES}; do