[chef] Data bags as JSON files in subdirectory structure


Chronological Thread 
  • From: Russell Bateman < >
  • To:
  • Subject: [chef] Data bags as JSON files in subdirectory structure
  • Date: Mon, 23 Sep 2013 16:20:56 -0600

I'm a little confused by the examples I see of data bags, in http://docs.opscode.com/essentials_data_bags.html and elsewhere.

I keep all my Chef stuff in a filesystem (and Git) thus:
cookbooks
nodes
roles

This has all be working very well. Growing up to be man in Chef and learning data bags, I plan to add to this
data_bags
    admins
        charlie.json
...and not
data_bags
    _admins
        _charlie.json


I see some mention of substructure in the doc, but it's confusing; sometimes subdirectories and filenames are prefixed with an underscore while there's no mention of it in the outer discussion, such as the following command, but I wish to avoid underscores unless significant or best practice. Examples of telling my Chef server about this data bag tend to suggest using
knife data bag from file admins data_bags/admins/charlie.json

This is the path in my filesystem, which I commit to Git. Am I missing something here?

Many thanks!



Archive powered by MHonArc 2.6.16.

§