diff --git a/metadata.rb b/metadata.rb index facaaa6..4c2436c 100644 --- a/metadata.rb +++ b/metadata.rb @@ -7,6 +7,6 @@ long_description 'Resource Cookbook for Managing Chef Software Inc Product Suite' issues_url 'https://github.com/ncerny/chef_stack/issues' if respond_to?(:issues_url) source_url 'https://github.com/ncerny/chef_stack' if respond_to?(:source_url) -version '0.6.1' +version '0.6.3' depends 'chef-ingredient' diff --git a/resources/file.rb b/resources/file.rb index 9b7473c..e616f59 100644 --- a/resources/file.rb +++ b/resources/file.rb @@ -21,7 +21,7 @@ default_action :create property :filename, String, name_property: true -property :source, String, required: true +property :source, String property :user, String, default: 'root' property :group, String, default: 'root' property :mode, String, default: '0600' @@ -31,6 +31,7 @@ end action :create do + new_resource.source = (property_is_set?(:source) ? new_resource.source : "cookbook_file://#{new_resource.filename}") if new_resource.source.start_with?('cookbook_file://') src = new_resource.source.split('://')[1].split('::')