I wanted to enable Passwd ohai plugin in my node in test kitchen. On a regular node, I've done it by adding:
ohai.optional_plugins = [
:Passwd
]
to /etc/chef/client.rb
.
I wanted to achieve the same in a test node, so I added to my .kitchen.yml:
provisioner:
name: chef_zero
client_rb:
Ohai::Config[:optional_plugins] =
- passwd
But when I converge the node, the plugin is not enabled. On a test node, in /home/vagrant/.chef/client.rb
there is no entry about ohai optional plugins and templates that I am using during converge, can not see node['etc']['group']['SOME_USERNAME']['gid']
attribute (even after second converge, because Ohai have to run first time and then save attributes).
How can I enable Ohai plugin on a test kitchen node?