-
Notifications
You must be signed in to change notification settings - Fork 113
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
Plugin_path configuration issue with custom plugins #54
Comments
Pretty sure there isn't anything unexpected here - if the attribute check is moved into the recipe as opposed to the attributes I'm pretty sure you'd get the desired effect. Try that and let us know - at least as I read this there isn't anything wrong so much as the order of operations should simply be changed. |
Thanks for your suggestion, it surely "works", but this is not the described scenario ... I want to use my attribute in the attribute file. I don't want to move it to the recipe, I want the ohai attributes available in attributes phase, which seems to me normal. To rephrase my question:
|
What do you mean by the "attributes phase"? This cookbook isn't going to change how ohai works. The error you are pasting in here is around test kitchen + ohai. |
@iennae the example I give you is a repro in kitchen yes. I'll try to explain in a different way, let's say cookbook B depends on an ohai attribute defined in cookbook A
In this example, the "attribute phase" starts after 1. and ends before 4. Is it clearer this way? |
@Annih, if I understand the docs, you need to specify |
Thanks @mikemol for your answer, but in my case I'm not in a ohai plugin, I'm using the result of a plugin in attributes files. |
Cookbook version
Chef-client version
12.8
Platform Details
CentOS 7.2 / Windows Server 2012R2
Scenario:
I'm trying to define an ohai plugin, but also use its values in my attributes file.
Steps to Reproduce:
my_cookbook/attributes/default.rb
my_cookbook/recipes/default.rb
my_cookbook/files/default/my_custom_plugin.rb
Expected Result:
At first run I expect to get the unavailable warning; but at 2nd run I should normally have access to my ultra important attribute.
Actual Result:
Even using the
compile_time
property of the ohai_plugin resource, my attribute is not accessible from attributes file.I know that I'm able to change the
ohai.plugin
path usingchef-client
cookbook, but a simple cookbook maintainer I don't want to change my user's configuration.What do you suggest?
IMHO the present
ohai
cookbook should be responsible ofOhai
configuration see chef/ohai#919Regards.
Cc. @aboten
The text was updated successfully, but these errors were encountered: