From 69e676027c1156fb27aab97b69cad94bf155d3e5 Mon Sep 17 00:00:00 2001 From: sio Date: Wed, 6 Jan 2021 09:49:04 +0100 Subject: [PATCH] adapt pull-config pout gitea distant --- pull-config | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pull-config b/pull-config index 25d4cd1..5429d4d 100644 --- a/pull-config +++ b/pull-config @@ -1,24 +1,21 @@ #!/bin/bash +if [ -z ${UREP+x} ]; then + UREP=https://gitea.lyc-lecastel.fr/gadmin/gsb2021.git +fi +REPO=$(basename ${UREP}) + dir=/root/tools/ansible host=depl hostf=$host.sio.lan -repo=gsb -[ -e $dir ] || mkdir -p $dir +[ -e ${dir} ] || mkdir -p ${dir} -grep $hostf /etc/hosts > /dev/null || echo "10.121.38.10 $hostf $host" >> /etc/hosts +#grep $hostf /etc/hosts > /dev/null || echo "10.121.38.10 $hostf $host" >> /etc/hosts -cd $dir +cd ${dir} hostname > hosts - -#git clone http://$host/$repo.git - -cd $repo -git pull - -ansible-playbook -c local -i 'localhost,' $(hostname).yml -#ansible-pull -i $dir/hosts -d $repo -U http://$host/$repo.git +ansible-pull -i ${dir}/hosts -U "${UREP}" exit 0