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

Using lazy to fix attribute handling in resources and fix cases for chocolatey package upgrade #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

snkutlu
Copy link
Contributor

@snkutlu snkutlu commented Oct 8, 2018

Using "lazy" while passing attributes to custom resources

  • This will allow other app cookbooks / wrappers / role cookbooks in the run-list to be able to set telegraf input / output / perf_counter or other installation attributes even if they are later than telegraf cookbook in the run-list during compilation. This way, correct / desired values of attributes will be used.

Chocolatey package upgrade cases: If an older version is already installed

  • we need to stop the service so files will not be in use
  • Use action :upgrade instead of :install, which covers both actions

this will allow other app cookbooks / wrappers / role cookbooks in the
runlist to be able to set telegraf input / perf counter or
other install attributes even if they are later than telegraf cookbook
in the runlist. This way, correct / desired values of attributes will be
used.
@snkutlu snkutlu changed the title Using lazy Using lazy to fix attribute handling in resources and fix cases for chocolatey package upgrade Oct 11, 2018
If an older version is already installed
- we need to stop the service so files will not be in use
@don-code
Copy link
Contributor

I'm particularly interested in just the 46ee21c commit, which passes tests - this would solve a use case that we currently have, in which we inject the tags of an EC2 instance into the agent configuration at runtime. The block in question that does EC2 tag resolution runs at converge time, so the full values of config aren't available at compile time.

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

Successfully merging this pull request may close these issues.

2 participants