nettoyage, maj doc, README

This commit is contained in:
phil
2023-01-19 00:02:58 +01:00
parent e395c14752
commit da5011466b
22 changed files with 35 additions and 252 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/bash
## ps : 2021-04-01 15:25
## aa : 2023-04-18 15:25
set -o errexit
set -o pipefail

View File

@@ -1,5 +1,9 @@
#!/bin/bash
dir=/root/tools/ansible
prj=gsb2023
opt=""
if [ -z ${UREP+x} ]; then
UREP=https://gitea.lyc-lecastel.fr/gadmin/gsb2023.git
fi
@@ -11,6 +15,14 @@ dir=/root/tools/ansible
cd "${dir}" || exit 1
hostname > hosts
ansible-pull -i "${dir}/hosts" -C main -U "${UREP}"
if [[ $# == 1 ]] ; then
opt=$1
fi
if [[ "${opt}" == '-l' ]] ; then
cd "${dir}/${prj}" || exit 2
ansible-playbook -i localhost, -c local "$(hostname).yml"
else
ansible-pull -i "${dir}/hosts" -C main -U "${UREP}"
fi
exit 0