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
end
Any 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:value
and:sensitive
;:value
is the content of file, and:sensitive
sets the file read-writable only by itsowner
/group
action
: either:create
or:delete
;:delete
action deletes the whole directory