From 4babc67b6c5d27efacf1f509115e77ae6b4a2685 Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Tue, 7 May 2013 18:52:37 -0700 Subject: [PATCH] check for UUID, set hostname manually --- Vagrantfile | 5 +++-- manifests/site.pp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 2bdba24..fdda73f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -85,6 +85,9 @@ Vagrant.configure("2") do |config| uuidgen > /etc/kalabox/uuid export KALAUUID=$(cat /etc/kalabox/uuid) apt-get update -y + sudo echo '127.0.1.1 kala.'$KALAUUID'.box' >> /etc/hosts + sudo hostname kala.$KALAUUID.box + sudo echo 'kala.'$KALAUUID'.box' >> /etc/hostname apt-get install puppet -y if grep --quiet certname /etc/puppet/puppet.conf; then echo @@ -98,8 +101,6 @@ Vagrant.configure("2") do |config| echo 'environment = production' >> /etc/puppet/puppet.conf echo 'server = kalabox.kalamuna.com' >> /etc/puppet/puppet.conf echo 'listen = false' >> /etc/puppet/puppet.conf - echo 'certname = kala.'$KALAUUID'.f04083c46d392c7c7276a3570a96d095.box' >> /etc/puppet/puppet.conf - echo 'node_name_value = kala.'$KALAUUID'.f04083c46d392c7c7276a3570a96d095.box' >> /etc/puppet/puppet.conf service puppet restart -y fi fi diff --git a/manifests/site.pp b/manifests/site.pp index 3dd7f9e..105dd32 100755 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -5,7 +5,7 @@ * to the puppetmaster at kalabox.kalamuna.com */ -node /^kala\..*\.f04083c46d392c7c7276a3570a96d095\.box$/ { +node /^kala\.[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\.box$/ { # initialize core packages include git include unzip