boxes: Improve CM handling
This commit is contained in:
parent
7effe1f092
commit
e69441a99b
1 changed files with 17 additions and 7 deletions
|
@ -58,14 +58,23 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $SALT = 1 ]; then
|
if [ $SALT = 1 ]; then
|
||||||
|
if $(lxc-attach -n ${CONTAINER} -- which salt-minion &>/dev/null); then
|
||||||
|
log "Salt has been installed on container, skipping"
|
||||||
|
elif [ ${RELEASE} = 'raring' ]; then
|
||||||
|
warn "Salt can't be installed on Ubuntu Raring 13.04, skipping"
|
||||||
|
else
|
||||||
lxc-attach -n ${CONTAINER} -- apt-add-repository -y ppa:saltstack/salt
|
lxc-attach -n ${CONTAINER} -- apt-add-repository -y ppa:saltstack/salt
|
||||||
lxc-attach -n ${CONTAINER} -- apt-get update
|
lxc-attach -n ${CONTAINER} -- apt-get update
|
||||||
lxc-attach -n ${CONTAINER} -- apt-get install salt-minion -y --force-yes
|
chroot ${ROOTFS} apt-get install salt-minion -y --force-yes
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
log "Skipping Salt installation"
|
log "Skipping Salt installation"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $BABUSHKA = 1 ]; then
|
if [ $BABUSHKA = 1 ]; then
|
||||||
|
if $(lxc-attach -n ${CONTAINER} -- which babushka &>/dev/null); then
|
||||||
|
log "Babushka has been installed on container, skipping"
|
||||||
|
else
|
||||||
log "Installing Babushka"
|
log "Installing Babushka"
|
||||||
cat > $ROOTFS/tmp/install-babushka.sh << EOF
|
cat > $ROOTFS/tmp/install-babushka.sh << EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
@ -73,6 +82,7 @@ curl https://babushka.me/up | sudo bash
|
||||||
EOF
|
EOF
|
||||||
chmod +x $ROOTFS/tmp/install-babushka.sh
|
chmod +x $ROOTFS/tmp/install-babushka.sh
|
||||||
lxc-attach -n ${CONTAINER} -- /tmp/install-babushka.sh
|
lxc-attach -n ${CONTAINER} -- /tmp/install-babushka.sh
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
log "Skipping Babushka installation"
|
log "Skipping Babushka installation"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue