Saturday, April 20, 2013

Geppetto IDE, Vagrant and Puppet - part 2

Introductory tutorial on Geppetto IDE here:

https://puppetlabs.com/blog/geppetto-a-puppet-ide/

I come up with my first manifest:
file { "/tmp/somefile.txt":
    ensure => present,
    content => "Ciao scemo",
}

now, how do I execute it on my VirtualBox?

MUST READ Puppet and Vagrant tutorial here:
http://www.linux.com/news/software/applications/694157-setup-your-dev-environment-in-nothing-flat-with-puppet

Here we learn that under your vagrant base directory,
you should create a manifests folder and there a default.pp file, and there you stick your "file { "/tmp/somefile.txt":" etc etc declaration.

At this point, do "vagrant up" and the file somefile.txt is magically created in /tmp.

you can check by logging in with putty at port 2222 using vagrant/vagrant.

Interestingly, my default.pp file has ended up in /tmp/vagrant-puppet/manifests/default.pp on the VM.

more vagrant-puppet doc here: http://docs-v1.vagrantup.com/v1/docs/provisioners/puppet.html



No comments: