Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Chef Client
-
Labels:None
Description
Use case: http://help.opscode.com/discussions/questions/155-package-versions-in-node-attributes
"I'm running chef-client on Debian Lenny and have run the monit cookbook from the Opscode site. Unfortunately monit fails to start because Lenny only has version 4 and the template includes a "with start delay" option that only works with version 5. I'd like to do the right thing and wrap that in a conditional so that it's only included with version 5 but how do I know which version has been installed?"
We've discussed this before, and it would be nice to do something like retrieving the @current_resource.version for comparison.
Well, you could do something like:
At which point you could query the values in provider.current_resource
I'm not sure about the right way to make that easy to do.