Skip to content

Instantly share code, notes, and snippets.

@dairennlombard
Last active August 29, 2015 14:23
Show Gist options
  • Save dairennlombard/9255f9705db18706a3cd to your computer and use it in GitHub Desktop.
Save dairennlombard/9255f9705db18706a3cd to your computer and use it in GitHub Desktop.
Chef::DataBagItem.load('kmtcnfs', 'nfs')['nfsexports'].each do |exporthash|
exporthash.each do |serverpathkey, _clientpathkey|
nfs_export "food_critic_safe_#{serverpathkey['serverpath']}" do
directory serverpathkey['serverpath']
network node['network']['CIDR']
writeable false
sync true
options ['no_root_squash']
only_if { File.exist?(serverpathkey['serverpath']) }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment