From 0e3ea184ee7ea2afa933007185315b81e48f2842 Mon Sep 17 00:00:00 2001 From: phil Date: Wed, 6 Jan 2021 00:56:10 +0100 Subject: [PATCH] ajust pull-config pour gitea --- pre/pull-config | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pre/pull-config b/pre/pull-config index 25d4cd1..fc5a08c 100644 --- a/pre/pull-config +++ b/pre/pull-config @@ -1,5 +1,12 @@ #!/bin/bash +if [ -z ${UREP+x} ]; then + UREP=https://gitea.lyc-lecastel.fr/gadmin/gsb2021.git +else + echo "var is set to '$var'" +fi +REPO=$(basename ${UREP}) + dir=/root/tools/ansible host=depl hostf=$host.sio.lan @@ -7,7 +14,7 @@ repo=gsb [ -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 @@ -15,10 +22,11 @@ hostname > hosts #git clone http://$host/$repo.git -cd $repo -git pull +#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-playbook -c local -i 'localhost,' $(hostname).yml +#ansible-pull -i $dir/hosts -d $repo -U "${UREP}" +ansible-pull -i $dir/hosts -U "${UREP}" exit 0