3 # script requires information about subdomain
5 >&2 echo "Please provide the subdomain to Vagrant"
13 # install specific versions of puppet modules
14 puppet module install puppetlabs-stdlib -v 4.5.1
15 puppet module install puppetlabs-concat -v 1.2.0
16 #puppet module install lex-dnsmasq -v 2.6.1
17 puppet module install saz-dnsmasq -v 1.2.0
19 # write the subdomain information into a custom facter fact
20 mkdir -p /etc/facter/facts.d/
21 echo "subdomain=${SUBDOM}" > /etc/facter/facts.d/subdomain.txt
24 puppet apply /vagrant/lib/lf-networking/confignetwork.pp
29 # remove current networking configurations
30 rm -f /etc/sysconfig/network-scripts/ifcfg-eth*
34 # don't let cloud-init do funny things to our routing
35 chattr +i /etc/sysconfig/network-scripts/route-eth0
37 # so that the network stack doesn't futz with our resolv config
38 # after we've configured it
39 # chattr +i /etc/resolv.conf
42 ubuntu_systems_post() {
43 # don't let cloud-init destroy our routing
44 # chattr +i /etc/network/if-up.d/0000routing
45 echo "---> do nothing for now"
48 # Execute setup that all systems need
51 echo "---> Checking distribution"
52 FACTER_OSFAMILY=`/usr/bin/facter osfamily`
53 FACTER_OS=`/usr/bin/facter operatingsystem`
54 case "$FACTER_OSFAMILY" in
62 echo "---> Ubuntu found"
66 "---> Nothing to do for ${FACTER_OS}"
71 echo "---> Unknown OS: ${FACTER_OSFAMILY}"
75 # vim: sw=4 ts=4 sts=4 et :