-
-
Save j05h/3803996 to your computer and use it in GitHub Desktop.
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
Array.new.tap do |a| | |
# Break the directory into pieces for recursive creation. | |
# ["/opt", "MegaRAID", "MegaCli"] | |
parts = node['megaraidcli']['dir'].scan(/^\/(?:[a-zA-Z]+)|(?:[a-zA-Z]+)/) | |
parts.each do |parts| | |
a << parts | |
directory a.join(::File::SEPARATOR) do | |
owner "root" | |
group "root" | |
mode 00775 | |
recursive true | |
action :create | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment