Public
Snippet $347 authored by Guillaume Hervier

re6stnet upgrade

Edited
re6stnet-upgrade.sh
#!/bin/bash
set -ex

echo 0 > /opt/upgrader/last-upgrade
echo 0 > /opt/upgrader/current-upgrade-signature
rm -rf /opt/upgrader/playbook-tmp
mkdir /opt/upgrader/playbook-tmp
cd /opt/upgrader/playbook-tmp
slapcache-download --destination=archive.tar.gz
tar -xzvf archive.tar.gz
rm -f archive.tar.gz
rm -rf /opt/upgrader/playbook
cp -R /opt/upgrader/playbook-tmp /opt/upgrader/playbook
cd /opt/upgrader/playbook
ansible-playbook upgrader-run.yml --extra-vars "upgrader_playbook=vifib-upgrade.yml" -i hosts