This cookbook provides a single resource envdir_ii_envdir, mainly
used for envdir command in daemontools
(http://cr.yp.to/daemontools.html).
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
endAny files in the directory not defined in values will be removed.
path: directory path managed by this resource. if omitted, the resource name is used.owner: Directory and files ownergroup: Directory and files groupvalues: Hash of:valueand:sensitive;:valueis the content of file, and:sensitivesets the file read-writable only by itsowner/groupaction: either:createor:delete;:deleteaction deletes the whole directory