forked from sous-chefs/autofs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working automaster_entry with deprication warning
- Loading branch information
Showing
7 changed files
with
60 additions
and
76 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
property :mount_point, String, name_property: true | ||
property :map, String | ||
property :options, String | ||
|
||
action :create do | ||
package 'autofs' | ||
service 'autofs' do | ||
action [:enable, :start] | ||
end | ||
file '/etc/auto.master' | ||
|
||
replace_or_add mount_point do | ||
path '/etc/auto.master' | ||
pattern "#{mount_point} #{map}.*" | ||
line "#{mount_point} #{map} #{options}" | ||
notifies :reload, 'service[autofs]', :immediately | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
property :key, String, name_property: true | ||
property :location, Path | ||
property :options, default: nil | ||
property :map, Path | ||
property :fstype, String | ||
# property :mount_point, Path, default: '/' + map.match(/(?:\.)(.*)/).captures[0] | ||
|
||
action :create do | ||
file map | ||
automaster_entry mount_point do | ||
map | ||
end | ||
service 'autofs' | ||
if options.nil? | ||
opts = fstype | ||
else | ||
opts = [fstype, options].join(',') | ||
end | ||
replace_or_add key do | ||
path map | ||
pattern "#{key}.*" | ||
line "#{key} -fstype=#{opts} #{location}" | ||
notifies :reload, 'service[autofs]', :immediately | ||
end | ||
|
||
case fstype | ||
when 'nfs4' | ||
include_recipe 'chef-sugar' | ||
package 'nfs-utils' if rhel? | ||
package 'nfs-common' if debian? | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
property :server, String | ||
property :export, Path | ||
# property :location, default: "#{server}:#{export}" | ||
property :map, default: '/etc/auto.nfs' | ||
property :mount_point, default: '/-' | ||
property :fstype, default: 'nfs4' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
automaster_entry '/misc', '/etc/auto.misc' do | ||
automaster_entry '/misc' do | ||
map '/etc/auto.misc' | ||
end |