diff --git a/example/Vagrantfile b/example/Vagrantfile index d528efb..b001eae 100644 --- a/example/Vagrantfile +++ b/example/Vagrantfile @@ -13,4 +13,26 @@ Vagrant.configure("2") do |config| lxc.start_opts << 'lxc.cgroup.memory.limit_in_bytes=400M' lxc.start_opts << 'lxc.cgroup.memory.memsw.limit_in_bytes=500M' end + + config.vm.provision :shell, :inline => <<-SCRIPT +echo "Hi there I'm the shell script used for provisioning" +if `which puppet > /dev/null`; then + echo "Looks like puppet has already been installed, moving on" + exit 0 +fi +echo "I'm about to install puppet!" +sleep 1 +echo "Hang tight, I just need to wait for a while since vagrant-lxc is not handling network properly ;)" +sleep 5 +sudo apt-get update +sudo apt-get install puppet -y + SCRIPT + + config.vm.provision :puppet do |puppet| + puppet.module_path = "puppet/modules" + puppet.manifests_path = "puppet/manifests" + puppet.manifest_file = "site.pp" + # If you want to make some noise + # puppet.options << [ '--verbose', '--debug' ] + end end diff --git a/example/puppet/manifests/site.pp b/example/puppet/manifests/site.pp new file mode 100644 index 0000000..22446c1 --- /dev/null +++ b/example/puppet/manifests/site.pp @@ -0,0 +1,6 @@ +Exec { path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/'] } + +notice "Hi there! puppet here" + +require hello_world + diff --git a/example/puppet/modules/hello_world/manifests/init.pp b/example/puppet/modules/hello_world/manifests/init.pp new file mode 100644 index 0000000..716995d --- /dev/null +++ b/example/puppet/modules/hello_world/manifests/init.pp @@ -0,0 +1,3 @@ +class hello_world { + notice "Hi there! It's a puppet module here. Things seem to be working just fine ;-)" +}