Comments (1)
I believe what you're running into is a compile time vs. converge time problem in your recipe. Chef runs in two different phases. The first is a compile time phase where Ruby is evaluated. The 2nd phase involves actually converging each of the resources. The puts
statements are actually running before the plugin is installed since the puts
statements happen in the compile phase. You can work around some of this by adding compile_time true
to the ohai plugin, but also testing with puts is going to be problematic since it's running during compile time. For troubleshooting you might have a better time adding chef log
resources to the recipe as those will execute during the converge.
A nice blog explaining the Chef run process:
https://coderanger.net/two-pass/
The log resource:
https://docs.chef.io/resource_log.html
from ohai.
Related Issues (20)
- chefspec tests broken HOT 2
- undefined method `config' for Ohai:Module HOT 1
- Ohai 4.0.1 error on windows.
- allow to specify a cookbook for plugin template/cookbook-file resources HOT 2
- Plugin path check is always case-sensitive
- error executing ohai_plugin HOT 2
- Plugin_path configuration issue with custom plugins HOT 6
- ohai plugin_path logic doesn't work with Chef local mode HOT 4
- NameError: No resource, method, or local variable named desired_plugin_path HOT 4
- Ohai plugin_path comparison does not handle different path separators HOT 3
- v5.0.1 not on Supermarket HOT 1
- Release 5.0.1 is broken HOT 8
- This cookbook is currently broken in 5.0.1
- AMZ linux and chef 13 ohai hints issue HOT 6
- Interesting Plugin Error with Chef 13 HOT 10
- Getting undefined local variable or method when using `ohai` cookbook with chef 14 HOT 1
- Ohai and plugin paths with subdirectories has validation issues HOT 4
- Error on Ohai 5.2.3 - ohai/plugin_helpers.rb is a version 6 plugin. Version 6 plugins are no longer supported by Ohai. HOT 1
- spec_helper.rb HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ohai.