This release completes the migration to custom resources. Top-level cookbook
attributes/ and recipes/ are removed. Consumers should declare resources from
their own wrapper cookbooks instead of including filesystem::default or setting
cookbook default attributes.
Previously, a run list could include:
include_recipe 'filesystem'The default recipe installed some platform packages, included the lvm cookbook,
and read filesystem definitions from node['filesystems'].
Filesystem definitions were commonly supplied as attributes:
{
"filesystems": {
"testfs1": {
"device": "/dev/sdb",
"mount": "/db",
"fstype": "xfs",
"options": "noatime,nodev"
}
}
}Default filesystem tool packages were also supplied by
node['filesystem_tools'].
Call the custom resources directly from your wrapper cookbook recipes.
filesystem 'testfs1' do
device '/dev/sdb'
mount '/db'
fstype 'xfs'
options 'noatime,nodev'
action [:create, :enable, :mount]
endThe resource now owns the default filesystem tool mapping through the
filesystem_tools property. Override it only when your platform needs different
package names or mkfs force options.
filesystem 'data' do
device '/dev/sdb'
mount '/data'
fstype 'ext4'
filesystem_tools(
'ext4' => {
'package' => 'e2fsprogs',
'forceopt' => '-F',
}
)
action [:create, :enable, :mount]
endUse filesystem_create_all_from_key when you still want keyed filesystem data,
but pass the data as a resource property.
filesystem_create_all_from_key 'filesystems' do
filesystems(
'testfs1' => {
'device' => '/dev/sdb',
'mount' => '/db',
'fstype' => 'xfs',
'options' => 'noatime,nodev',
}
)
endFor compatibility, filesystem_create_all_from_key 'filesystems' still reads
node['filesystems'] when the filesystems property is not set. New code should
prefer the explicit property form.
Declare LVM-backed filesystems directly:
filesystem 'applv1' do
vg 'standardvg'
size '20G'
mount '/logical1'
fstype 'ext4'
action [:create, :enable, :mount]
endDeclare file-backed loop devices directly:
filesystem 'filebacked' do
file '/mnt/filesystem-on-a-filesystem.file'
device '/dev/loop7'
mount '/mnt/filesystem-on-a-filesystem'
size '20000'
action [:create, :enable, :mount]
endinclude_recipe 'filesystem'is no longer available.include_recipe 'filesystem::example'is no longer available.- Top-level cookbook defaults under
attributes/default.rbare no longer loaded. - Package defaults for filesystem tools are now resource defaults, not node attributes.