Created
February 24, 2012 19:17
-
-
Save ctgswallow/1903085 to your computer and use it in GitHub Desktop.
pentaho::nfs_mount
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: pentaho | |
# Recipe:: default | |
# | |
provide_service("nfs-client-for-pentaho") | |
searchenv = node[:pentaho][:nfs_environment] ? node[:pentaho][:nfs_environment] : nil | |
wait_for_service("nfs-server-for-pentaho", 1, 5, true, searchenv) | |
nfs_server = provider_for_service("nfs-server-for-pentaho", true, searchenv) | |
nfs_server['nfs']['exports'].each do |k, v| | |
host = nfs_server[:clustered_lvm][:ctdb_virtual_ips] ? nfs_server[:clustered_lvm][:ctdb_virtual_ips].first : nfs_server[:fqdn] | |
if (v.allowed ~ /#{node.ipaddress}/ || v.allowed ~ /*/) then | |
Chef::Log.info "Will mount #{host}:#{k} at node[:pentaho][:install_dir]" | |
nfs_mount "#{host}:#{k}" do | |
mount_point node[:pentaho][:install_dir] | |
options "soft,fg" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment