#!/bin/bash

if [ -z ${UREP+x} ]; then 
	UREP=https://gitea.lyc-lecastel.fr/gadmin/gsb2021.git 
fi

dir=/root/tools/ansible

[ -e "${dir}" ] || mkdir -p "${dir}"

cd  "${dir}" || exit 1

hostname  > hosts
ansible-pull -i "${dir}/hosts"  -U "${UREP}"

exit 0