Skip to content

Simple cookbook to deal with directories specified directly in the attributes

Notifications You must be signed in to change notification settings

mconf-cookbooks/dirs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dirs Cookbook

A very simple cookbook to create directories and set permissions.

If the directory doesn't exist, it is created. If it already exists, it has its permissions set.

Attributes

dirs::default

Key Type Description Default
['dirs']['create'] Array Array of directories to be created or have its permissions set. []
['dirs']['create'][n] Hash A hash with the attributes for a directory. Accepts the attributes "path", "user", "group" and "chmod". -

Usage

dirs::default

Just include dirs in your node's run_list and specify the attributes:

{
  "name":"my_node",
  "dirs": {
    "create": [
      {
        "path": "/var/www/my-app",
        "user": "my-user",
        "group": "my-group",
        "chmod": "0755"
      },
      {
        "path": "/etc/my-app",
        "user": "root",
        "group": "root",
        "chmod": "0700"
      }
    ]
  },
  "run_list": [
    "recipe[dirs]"
  ]
}

About

Simple cookbook to deal with directories specified directly in the attributes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages