forked from stove/dataset
ansible integration
This commit is contained in:
parent
abe9155b4c
commit
856607fc52
3 changed files with 15 additions and 12 deletions
|
@ -9,6 +9,7 @@
|
|||
<variable name="hide_secret" type="boolean" description="Les secrets sont obscurcis" mode="expert" help="Obscurcir les secrets peut permettre de générer des configurations diffusable sans problème de confidentialité ou pour comparer deux configurations générés à des moments différents">
|
||||
<value>False</value>
|
||||
</variable>
|
||||
<variable name="module_name" type="string" hidden="True" provider="global:module_name" mandatory="True"/>
|
||||
<family name="network" description="Réseau">
|
||||
<variable name="server_name" type="domainname" hidden="True" provider="global:server_name" mandatory="True"/>
|
||||
<variable name="zones_list" type="string" multi="True" description="Liste de toutes les zones" mandatory="True" hidden="True" provider="global:zones_name"/>
|
||||
|
|
|
@ -9,7 +9,7 @@ from os import makedirs as _makedirs
|
|||
#from risotto.utils import ZONES_SERVER
|
||||
|
||||
|
||||
_HERE = _dirname(_abspath(__main__.__file__))
|
||||
_HERE = _dirname(_dirname(_abspath(__main__.__file__)))
|
||||
_PASSWORD_DIR = _join(_HERE, 'password')
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
HOST_NAME=$1
|
||||
IMAGE_NAME=$2
|
||||
MACHINE=$3
|
||||
exit 0
|
||||
. config.sh
|
||||
. config_machine.sh
|
||||
if [ -z "$MACHINE" ]; then
|
||||
|
@ -40,24 +41,25 @@ fi
|
|||
if [ "$NEW_CONF" = true ]; then
|
||||
echo " - delete old settings"
|
||||
./diff.py "$MACHINE" "$MACHINE_RISOTTO_CONFIG_DIR" "$MACHINE_RISOTTO_CONFIG_DIR_LOCAL" > "$MACHINE_RISOTTO_CONFIG_DIR"_changelog.md
|
||||
rm -rf "$MACHINE_RISOTTO_CONFIG_DIR"
|
||||
# rm -rf "$MACHINE_RISOTTO_CONFIG_DIR"
|
||||
fi
|
||||
|
||||
cp -a "$MACHINE_NAME_NSPAWN_LOCAL" "$MACHINE_NAME_NSPAWN"
|
||||
cp -a "$MACHINE_NAME_SCRIPT_LOCAL" "$MACHINE_NAME_SCRIPT"
|
||||
if [ ! -d "$MACHINE_RISOTTO_CONFIG_DIR" ]; then
|
||||
cp -a "$MACHINE_RISOTTO_CONFIG_DIR_LOCAL" "$MACHINE_RISOTTO_CONFIG_DIR"
|
||||
fi
|
||||
if [ ! -d "$MACHINE_RISOTTO_SRV_DIR" ] && [ -d "$MACHINE_RISOTTO_SRV_DIR_LOCAL" ]; then
|
||||
mkdir -p "$MACHINE_RISOTTO_SRV_DIR"
|
||||
fi
|
||||
mkdir -p "$RISOTTO_JOURNALD_DIR"
|
||||
#cp -a "$MACHINE_NAME_NSPAWN_LOCAL" "$MACHINE_NAME_NSPAWN"
|
||||
#cp -a "$MACHINE_NAME_SCRIPT_LOCAL" "$MACHINE_NAME_SCRIPT"
|
||||
#if [ ! -d "$MACHINE_RISOTTO_CONFIG_DIR" ]; then
|
||||
# cp -a "$MACHINE_RISOTTO_CONFIG_DIR_LOCAL" "$MACHINE_RISOTTO_CONFIG_DIR"
|
||||
#fi
|
||||
#if [ ! -d "$MACHINE_RISOTTO_SRV_DIR" ] && [ -d "$MACHINE_RISOTTO_SRV_DIR_LOCAL" ]; then
|
||||
# mkdir -p "$MACHINE_RISOTTO_SRV_DIR"
|
||||
#fi
|
||||
#mkdir -p "$RISOTTO_JOURNALD_DIR"
|
||||
if [ ! -d "$MACHINE_MACHINES_DIR" ]; then
|
||||
cd "$MACHINES_DIR"
|
||||
mkdir "$IMAGE_NAME"
|
||||
cd "$IMAGE_NAME"
|
||||
tar xf "$IMAGE_NAME_RISOTTO_IMAGE_NAME"
|
||||
mkdir -p "$SHA_MACHINE_DIR"
|
||||
cp -a "$IMAGE_NAME_RISOTTO_IMAGE_NAME".sha "$SHA_MACHINE"
|
||||
mv "$IMAGE_NAME" "$MACHINE_MACHINES_DIR"
|
||||
cd - > /dev/null
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue