Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute precedence not working with Windows scheduled tasks #684

Open
teeheezy opened this issue May 15, 2020 · 0 comments
Open

Attribute precedence not working with Windows scheduled tasks #684

teeheezy opened this issue May 15, 2020 · 0 comments

Comments

@teeheezy
Copy link

teeheezy commented May 15, 2020

Using chef-client cookbook on windows to add scheduled task and run the Chef client on an interval based on the ['chef_client']['interval'] and ['chef_client']['splay'] attributes. The default interval value in the chef-client\attributes\default.rb file is set to '1800' seconds (30 minutes).

In a wrapper cookbook I added the following to my default recipe:

include_recipe 'chef-client::default'

node.default['chef_client']['interval'] = '600'
node.default['chef_client']['splay'] = '120'

Upon running the chef client my scheduled task is created but always with the default value of 30 minutes specified in the chef-client\attributes\default.rb file. I checked the attributes for this run in Automate and chef_client.interval is set to '600', it just didn't pass that to the scheduled task.

Interestingly, when I override the attribute in my policy file it does set the value for the scheduled task correctly. This only seems to affect declarations in the recipe and attribute default.rb file for the wrapper recipe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant