Skip to content

Instantly share code, notes, and snippets.

@f9n
Last active August 9, 2018 14:42
Show Gist options
  • Save f9n/7c2d9c5b27b1e476acee1c3a2c036ed9 to your computer and use it in GitHub Desktop.
Save f9n/7c2d9c5b27b1e476acee1c3a2c036ed9 to your computer and use it in GitHub Desktop.
Chef Dk Setup
vagrant@bionic:~$ cat hello.rb 
file '/tmp/hello.txt' do
 content 'hello universe'
end
vagrant@bionic:~$ chef-apply hello.rb 
Recipe: (chef-apply cookbook)::(chef-apply recipe)
  * file[/tmp/hello.txt] action create
    - create new file /tmp/hello.txt
    - update content in file /tmp/hello.txt from none to 2935ea
    --- /tmp/hello.txt 2018-07-12 13:50:56.012905258 +0000
    +++ /tmp/.chef-hello20180712-2857-1pj71ks.txt 2018-07-12 13:50:56.008903259 +0000
    @@ -1 +1,2 @@
    +hello universe
vagrant@bionic:~$ cat /tmp/hello.txt 
hello universe
vagrant@bionic:~$ wget https://packages.chef.io/files/stable/chefdk/3.1.0/ubuntu/18.04/chefdk_3.1.0-1_amd64.deb
...
vagrant@bionic:~$ sudo dpkg -i chefdk_3.1.0-1_amd64.deb
...
vagrant@bionic:~$ chef --version
Chef Development Kit Version: 3.1.0
chef-client version: 14.2.0
delivery version: master (6862f27aba89109a9630f0b6c6798efec56b4efe)</p>
berks version: 7.0.4
kitchen version: 1.22.0
inspec version: 2.1.72
vagrant@bionic:~$ git config --global user.name "rstallman"
vagrant@bionic:~$ git config --global user.email "[email protected]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment