aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-03 14:08:29 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-03 14:08:29 -0300
commitc6ab319d3d04ee695163badf6c3ae931056a249d (patch)
tree36c131b4693d128bd4c6467bc4cbd6ad658ea7f5
parent2620433e249304c88bf2f177939ae5be61d6cfc0 (diff)
downloadpuppet-bootstrap-c6ab319d3d04ee695163badf6c3ae931056a249d.tar.gz
puppet-bootstrap-c6ab319d3d04ee695163badf6c3ae931056a249d.tar.bz2
Defining multiple VMs
-rw-r--r--.gitignore1
-rw-r--r--README.md2
-rw-r--r--Vagrantfile27
-rw-r--r--puppet.conf2
4 files changed, 30 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 9ae26c0..ce9693b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
modules/*
+.vagrant
diff --git a/README.md b/README.md
index bbd48d9..a05301a 100644
--- a/README.md
+++ b/README.md
@@ -25,4 +25,4 @@ This will be a `Vagrant` example:
git clone git://git.sarava.org/puppet-bootstrap.git puppet # use submodule or subtree as you please
ln -s puppet/Vagrantfile . # or copy if you want to customize
( cd puppet && mr up ) # need the mr binary to download the submodules
- vagrant up
+ vagrant up web # with no arguments, all defined VMs are started
diff --git a/Vagrantfile b/Vagrantfile
index 6c74ddb..29e7378 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -16,6 +16,33 @@ Vagrant::Config.run do |config|
puppet.pp_path = "/etc/puppet"
end
+ # Define a Host VM
+ config.vm.define :host do |host_config|
+ db_config.vm.box = "host"
+ web_config.vm.network :hostonly, "192.168.50.101"
+ end
+
+ # Define a Puppetmaster VM
+ config.vm.define :master do |master_config|
+ master_config.vm.box = "master"
+ master_config.vm.forward_port 8139, 8140
+ web_config.vm.network :hostonly, "192.168.50.102"
+ end
+
+ # Define a Proxy VM
+ config.vm.define :proxy do |proxy_config|
+ proxy_config.vm.box = "proxy"
+ proxy_config.vm.forward_port 8139, 8140
+ web_config.vm.network :hostonly, "192.168.50.103"
+ end
+
+ # Define a Web VM
+ config.vm.define :web do |web_config|
+ web_config.vm.box = "web"
+ web_config.vm.forward_port 80, 8080
+ web_config.vm.network :hostonly, "192.168.50.104"
+ end
+
# Share hiera configuration.
config.vm.share_folder "hiera", "/etc/puppet/hiera", "puppet/hiera", create: true
end
diff --git a/puppet.conf b/puppet.conf
index cc3dcd4..eae3864 100644
--- a/puppet.conf
+++ b/puppet.conf
@@ -19,7 +19,7 @@ ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
[agent]
-server = puppet.example.org
+server = puppet
vardir = /var/lib/puppet
ssldir = $vardir/ssl
runinterval = 7200