Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @stevendanna stevendanna renamed this gist May 10, 2013. 1 changed file with 13 additions and 5 deletions.
    18 changes: 13 additions & 5 deletions gistfile1.txt → gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # An example cookbook directory
    ```
    sdanna@gaius ~/tmp/example > tree
    .
    ├── cookbooks
    @@ -19,12 +21,14 @@ sdanna@gaius ~/tmp/example > tree
    └── solo.rb
    12 directories, 5 files
    ```
    # My minimal solo.rb
    ```
    sdanna@gaius ~/tmp/example > cat solo.rb
    cookbook_path '/Users/sdanna/tmp/example/cookbooks'
    sdanna@gaius ~/tmp/example > cat cookbooks/foobar/re
    recipes/ resources/
    sdanna@gaius ~/tmp/example > cat cookbooks/foobar/re
    recipes/ resources/
    ```
    # My test recipe
    ```
    sdanna@gaius ~/tmp/example > cat cookbooks/foobar/recipes/default.rb
    #
    # Cookbook Name:: foobar
    @@ -36,6 +40,9 @@ sdanna@gaius ~/tmp/example > cat cookbooks/foobar/recipes/default.rb
    #
    log "I'm Running Chef"
    ```
    # A chef run
    ```
    sdanna@gaius ~/tmp/example > sudo chef-solo -c solo.rb -o 'recipe[foobar]'
    Starting Chef Client, version 11.4.4
    [2013-05-09T21:10:11-07:00] WARN: Run List override has been provided.
    @@ -46,4 +53,5 @@ Converging 1 resources
    Recipe: foobar::default
    * log[I'm Running Chef] action write
    Chef Client finished, 1 resources updated
    Chef Client finished, 1 resources updated
    ```
  2. @stevendanna stevendanna created this gist May 10, 2013.
    49 changes: 49 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,49 @@
    sdanna@gaius ~/tmp/example > tree
    .
    ├── cookbooks
    │   └── foobar
    │   ├── CHANGELOG.md
    │   ├── README.md
    │   ├── attributes
    │   ├── definitions
    │   ├── files
    │   │   └── default
    │   ├── libraries
    │   ├── metadata.rb
    │   ├── providers
    │   ├── recipes
    │   │   └── default.rb
    │   ├── resources
    │   └── templates
    │   └── default
    └── solo.rb

    12 directories, 5 files
    sdanna@gaius ~/tmp/example > cat solo.rb
    cookbook_path '/Users/sdanna/tmp/example/cookbooks'
    sdanna@gaius ~/tmp/example > cat cookbooks/foobar/re
    recipes/ resources/
    sdanna@gaius ~/tmp/example > cat cookbooks/foobar/re
    recipes/ resources/
    sdanna@gaius ~/tmp/example > cat cookbooks/foobar/recipes/default.rb
    #
    # Cookbook Name:: foobar
    # Recipe:: default
    #
    # Copyright 2013, YOUR_COMPANY_NAME
    #
    # All rights reserved - Do Not Redistribute
    #

    log "I'm Running Chef"
    sdanna@gaius ~/tmp/example > sudo chef-solo -c solo.rb -o 'recipe[foobar]'
    Starting Chef Client, version 11.4.4
    [2013-05-09T21:10:11-07:00] WARN: Run List override has been provided.
    [2013-05-09T21:10:11-07:00] WARN: Original Run List: []
    [2013-05-09T21:10:11-07:00] WARN: Overridden Run List: [recipe[foobar]]
    Compiling Cookbooks...
    Converging 1 resources
    Recipe: foobar::default
    * log[I'm Running Chef] action write

    Chef Client finished, 1 resources updated