Skip to content

Commit

Permalink
Fix FC108: Resource should not define a property named 'name'
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan An <jan@esri.com>
  • Loading branch information
jonathanan committed Apr 25, 2018
1 parent 591a90a commit 1dd1c49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -322,7 +322,7 @@ The chef_client_scheduled_task setups up chef-client to run as a scheduled task.
- `log_directory` - The path to the Chef log directory. default: 'CONFIG_DIRECTORY/log'
- `chef_binary_path` - The path to the chef-client binary. default: 'C:/opscode/chef/bin/chef-client'
- `daemon_options` - An optional array of extra options to pass to the chef-client
- `name` - The name of the scheduled task. This allows for multiple chef_client_scheduled_task resources when it is used directly like in a wrapper cookbook. default: 'chef-client'
- `task_name` - The name of the scheduled task. This allows for multiple chef_client_scheduled_task resources when it is used directly like in a wrapper cookbook. default: 'chef-client'

## Maintainers

Expand Down
2 changes: 1 addition & 1 deletion recipes/task.rb
Expand Up @@ -46,5 +46,5 @@ class ::Chef::Recipe
log_directory node['chef_client']['log_dir']
chef_binary_path node['chef_client']['bin']
daemon_options node['chef_client']['daemon_options']
name node['chef_client']['task']['name']
task_name node['chef_client']['task']['name']
end
6 changes: 3 additions & 3 deletions resources/scheduled_task.rb
Expand Up @@ -30,7 +30,7 @@
property :log_directory, String, default: lazy { |r| "#{r.config_directory}/log" }
property :chef_binary_path, String, default: 'C:/opscode/chef/bin/chef-client'
property :daemon_options, Array, default: []
property :name, String, default: 'chef-client'
property :task_name, String, default: 'chef-client'

action :add do
create_chef_directories
Expand All @@ -52,7 +52,7 @@
"cmd /c \'#{client_cmd}\'"
end

windows_task new_resource.name do
windows_task new_resource.task_name do
run_level :highest
command full_command
user new_resource.user
Expand All @@ -65,7 +65,7 @@
end

action :remove do
windows_task new_resource.name do
windows_task new_resource.task_name do
action :delete
end
end
Expand Down

0 comments on commit 1dd1c49

Please sign in to comment.