nettoyage, maj doc, README
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
## ps : 2021-04-01 15:25
|
||||
## aa : 2023-04-18 15:25
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user