diff --git a/README.md b/README.md index bd6a542..10364b8 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Place the `ephemeral_lvm::default` in the runlist and the ephemeral devices will * `node['ephemeral_lvm']['filesystem']` - the filesystem to be used on the ephemeral volume. Default: `'ext4'` * `node['ephemeral_lvm']['mount_point']` - the mount point for the ephemeral volume. Default: `'/mnt/ephemeral'` +* `node['ephemeral_lvm']['mount_point_properties']` - the options used when mounting the ephemeral volume. Default: `{options: ['defaults', 'noauto'], pass: 0}` * `node['ephemeral_lvm']['volume_group_name']` - the volume group name for the ephemeral LVM. Default: `'vg-data'` * `node['ephemeral_lvm']['logical_volume_size']` - the size to be used for the ephemeral LVM. Default: `'100%VG'` - This will use all available space in the volume group. * `node['ephemeral_lvm']['logical_volume_name']` - the name of the logical volume for ephemeral LVM. Default: `'ephemeral0'` diff --git a/attributes/default.rb b/attributes/default.rb index 5021410..fdd4eae 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -25,6 +25,12 @@ # The ephemeral mount point default['ephemeral_lvm']['mount_point'] = "/mnt/ephemeral" +# The ephemeral mount point options +default['ephemeral_lvm']['mount_point_properties'] = { + options: ["defaults", "noauto"], + pass: 0 +} + # The ephemeral volume group name default['ephemeral_lvm']['volume_group_name'] = "vg-data" diff --git a/metadata.rb b/metadata.rb index cd1fa3e..72e65e4 100644 --- a/metadata.rb +++ b/metadata.rb @@ -29,6 +29,13 @@ :recipes => ["ephemeral_lvm::default"], :required => "recommended" +attribute "ephemeral_lvm/mount_point_properties", + :display_name => "Ephemeral LVM Mount Properties", + :description => "The options used when mounting the ephemeral volume", + :default => {:options => ["defaults", "noauto"], :pass => 0}, + :recipes => ["ephemeral_lvm::default"], + :required => "optional" + attribute "ephemeral_lvm/volume_group_name", :display_name => "Ephemeral LVM Volume Group Name", :description => "The volume group name for the ephemeral LVM", diff --git a/recipes/default.rb b/recipes/default.rb index 448ffae..c83b0d3 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -63,7 +63,9 @@ logical_volume node['ephemeral_lvm']['logical_volume_name'] do size node['ephemeral_lvm']['logical_volume_size'] filesystem node['ephemeral_lvm']['filesystem'] - mount_point location: node['ephemeral_lvm']['mount_point'], options: ['defaults', 'noauto'], pass: 0 + mount_point node['ephemeral_lvm']['mount_point_properties'].merge( + location: node['ephemeral_lvm']['mount_point'] + ) if ephemeral_devices.size > 1 stripes ephemeral_devices.size stripe_size node['ephemeral_lvm']['stripe_size'].to_i