Skip to content

Commit

Permalink
check for UUID, set hostname manually
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed May 8, 2013
1 parent 4dfef13 commit 4babc67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifests/site.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4babc67

Please sign in to comment.