467d84c620
* Separate OSTYPE specific tasks/files. * Keep only common tasks and files in the playbooks dir. TODO pxe case to be working for centos as well note, the cmtools.sh installs ansible 2.0.1.0 in centos7, while we have 2.0.0.2 for ubuntu trusty note, the base.yaml installs python-keystoneclient 1:1.3.0-1.el7 from kilo-2 (no juno for centos7), while for ubuntu we have one from juno note, there is no pygraphviz for centos7, see also https://bugs.launchpad.net/fuel/+bug/1510884 Closes-bug: #1548851 Change-Id: Icec5637f9242104322d1104725f9f132d1ca16f0 Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
53 lines
1.6 KiB
Bash
53 lines
1.6 KiB
Bash
#!/bin/bash -eux
|
|
|
|
if [[ $PACKER_BUILDER_TYPE =~ vmware ]]; then
|
|
echo "==> Installing VMware Tools"
|
|
# Assuming the following packages are installed
|
|
# apt-get install -y linux-headers-$(uname -r) build-essential perl
|
|
|
|
cd /tmp
|
|
mkdir -p /mnt/cdrom
|
|
mount -o loop /home/vagrant/linux.iso /mnt/cdrom
|
|
tar zxf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/
|
|
|
|
/tmp/vmware-tools-distrib/vmware-install.pl -d
|
|
|
|
rm /home/vagrant/linux.iso
|
|
umount /mnt/cdrom
|
|
rmdir /mnt/cdrom
|
|
rm -rf /tmp/VMwareTools-*
|
|
fi
|
|
|
|
if [[ $PACKER_BUILDER_TYPE =~ virtualbox ]]; then
|
|
echo "==> Installing VirtualBox guest additions"
|
|
# Assuming the following packages are installed
|
|
# apt-get install -y linux-headers-$(uname -r) build-essential perl
|
|
# apt-get install -y dkms
|
|
|
|
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
|
mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
|
sh /mnt/VBoxLinuxAdditions.run
|
|
umount /mnt
|
|
rm /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso
|
|
rm /home/vagrant/.vbox_version
|
|
|
|
if [[ $VBOX_VERSION = "4.3.10" ]]; then
|
|
ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
|
|
fi
|
|
/etc/init.d/vboxadd setup
|
|
fi
|
|
|
|
if [[ $PACKER_BUILDER_TYPE =~ parallels ]]; then
|
|
echo "==> Installing Parallels tools"
|
|
|
|
mount -o loop /home/vagrant/prl-tools-lin.iso /mnt
|
|
/mnt/install --install-unattended-with-deps
|
|
umount /mnt
|
|
rm -rf /home/vagrant/prl-tools-lin.iso
|
|
rm -f /home/vagrant/.prlctl_version
|
|
fi
|
|
|
|
if [[ $PACKER_BUILDER_TYPE =~ libvirt ]]; then
|
|
echo "==> Doing nothing special"
|
|
fi
|