If you don't know the right syntax, why don't you look it up? The Puppet documentation is excellent, especially the "Learning Puppet" sections. You want the require
keyword, and you want to read at least all of http://docs.puppetlabs.com/learning/index.html.
This should do it:
rbenv::compile { "1.9.3-p327":
user => "vagrant",
home => "/home/vagrant",
}
exec {"rbenv-global-1.9.3-p327":
command => "rbenv global 1.9.3-p327",
path => "/home/vagrant/.rbenv/bin",
require => Rbenv::Compile['1.9.3-p327']
}
Alternatively you can use chaining arrows to create the relationship explicitly:
rbenv::compile { "1.9.3-p327":
user => "vagrant",
home => "/home/vagrant",
}
exec {"rbenv-global-1.9.3-p327":
command => "rbenv global 1.9.3-p327",
path => "/home/vagrant/.rbenv/bin",
}
Rbenv::Compile['1.9.3-p327'] ->
Exec['rbenv-global-1.9.3-p327']