diff --git a/README.md b/README.md index 01b3358..958ac68 100644 --- a/README.md +++ b/README.md @@ -338,6 +338,7 @@ sumo_source_local_file `default` = `:create` - `:create` - creates a JSON Source configuration +- `:remove` - removes a previously configured JSON source configuration ### Attribute Parameters diff --git a/libraries/provider_source.rb b/libraries/provider_source.rb index 677768f..c92f359 100644 --- a/libraries/provider_source.rb +++ b/libraries/provider_source.rb @@ -35,6 +35,12 @@ def load_current_resource end end + action :remove do + file source_json_path do + action :delete + end + end + def api_version 'v1' end diff --git a/libraries/resource_source.rb b/libraries/resource_source.rb index 9015698..5551f5d 100644 --- a/libraries/resource_source.rb +++ b/libraries/resource_source.rb @@ -10,7 +10,7 @@ class SumoSource < Chef::Resource::LWRPBase default_action :create - actions :create + actions :create, :remove attribute :owner, regex: Chef::Config[:user_valid_regex] attribute :group, regex: Chef::Config[:group_valid_regex]