Compare commits

..

2 Commits

Author SHA1 Message Date
0e3ea184ee ajust pull-config pour gitea 2021-01-06 00:56:10 +01:00
faa413143d ajout Vagrantfile 2021-01-05 00:23:03 +01:00
2 changed files with 35 additions and 5 deletions

View File

@ -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

22
vagrant/Vagrantfile vendored Normal file
View File

@ -0,0 +1,22 @@
Vagrant.configure("2") do |config|
config.vm.define "s-adm" do |sadm|
sadm.vm.box = "bento/debian-10.7"
sadm.vm.hostname = 's-adm'
sadm.vm.network :public_network, ip: "dhcp"
sadm.vm.network :private_network, ip: "192.168.99.99", mask: "24"
config.vm.provider :virtualbox do |v|
v.memory = 512
# v.cpus = 2
end
end
config.vm.define "s-infra" do |v|
v.vm.box = "bento/debian-10.7"
v.vm.hostname = 's-infra'
v.vm.network :private_network, ip: "192.168.99.1", mask: "24"
v.vm.network :private_network, ip: "172.16.0.1", mask: "24"
end
end