File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -30,19 +30,20 @@ def get_template_id
3030 Chef ::Log . debug "template id = #{ template_id . stdout . chomp } "
3131 return template_id . stdout . chomp
3232 end
33-
34-
33+
3534 # Create or mount secondary storage path
3635 def secondary_storage
37- directory @current_resource . nfs_path do
38- owner "root"
39- group "root"
40- action :create
41- recursive true
42- not_if { ::File . exist? ( @current_resource . nfs_path ) }
36+ unless ::File . exist? ( @current_resource . nfs_path )
37+ # Use condition enclosing instead of "not_if" guard because resource nfs_path is not defined in case of resource merging
38+ directory @current_resource . nfs_path do
39+ owner "root"
40+ group "root"
41+ action :create
42+ recursive true
43+ end
4344 end
4445 end
45-
46+
4647 def download_systemvm_template
4748 # Create database configuration for cloudstack management server that will use and existing database.
4849 #puts "Downloading system template from: #{@current_resource.url}"
You can’t perform that action at this time.
0 commit comments