From f5aa1fdb8eb77421c522dc1359d6055b71a0209a Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Date: Sat, 11 Apr 2015 08:24:34 -0400 Subject: [PATCH] Added hello world chef recipie. --- .gitignore | 2 ++ Vagrantfile | 7 ++++++- hello.rb | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 hello.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0cfb38 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +hello.txt +/.vagrant diff --git a/Vagrantfile b/Vagrantfile index ec3f911..7214085 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,7 +2,8 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| - config.vm.box = "denis/archlinux64" + #config.vm.box = "denis/archlinux64" + config.vm.box = "ubuntu/trusty64" # config.vm.network "forwarded_port", guest: 80, host: 8080 @@ -44,4 +45,8 @@ Vagrant.configure(2) do |config| # sudo apt-get update # sudo apt-get install -y apache2 # SHELL + + config.vm.provision "chef_apply" do |chef| + chef.recipe = File.read("hello.rb") + end end diff --git a/hello.rb b/hello.rb new file mode 100644 index 0000000..332a8d1 --- /dev/null +++ b/hello.rb @@ -0,0 +1,3 @@ +file '/vagrant/hello.txt' do + content "Hello World!" +end -- GitLab