Skip to content

limitusus/envdir_ii

Repository files navigation

envdir_ii

CircleCI GitHub tag (latest SemVer) Chef cookbook

This cookbook provides a single resource envdir_ii_envdir, mainly used for envdir command in daemontools (http://cr.yp.to/daemontools.html).

Resource: envdir

Synopsis

Expresses a fully managed directory in form of a hash.

envdir_ii_envdir '/service/my_service/env' do
  owner 'application_user'
  group 'application_group'
  values(
    'PATH' => { value: "/usr/local/bin:/usr/bin" },
    'DB_PASSWORD' => { value: "P@SSW0RD", sensitive: true },
  )
  # If you need service reload on change
  notifies :reload, 'service[my_service]', :delayed
end

Any files in the directory not defined in values will be removed.

Properties

  • path: directory path managed by this resource. if omitted, the resource name is used.
  • owner: Directory and files owner
  • group: Directory and files group
  • values: Hash of :value and :sensitive; :value is the content of file, and :sensitive sets the file read-writable only by its owner/group
  • action: either :create or :delete; :delete action deletes the whole directory