ohai icon indicating copy to clipboard operation
ohai copied to clipboard

Reloading ohai with plugins specified fails.

Open Raboo opened this issue 5 years ago • 0 comments

Description

Reloading Ohai with plugins argument fails silently with chef v14 and v15.

https://docs.chef.io/resource_ohai.html#examples

This will fail.

ohai 'reload_passwd' do
  action :nothing
  plugin 'etc'
end

user 'daemonuser' do
  home '/dev/null'
  shell '/sbin/nologin'
  system true
  notifies :reload, 'ohai[reload_passwd]', :immediately
end

ruby_block 'just an example' do
  block do
    # These variables will now have the new values
    puts node['etc']['passwd']['daemonuser']['uid']
    puts node['etc']['passwd']['daemonuser']['gid']
  end
end

This works however

ohai 'reload_passwd' do
  action :nothing
  # plugin 'etc'
end
....

Ohai Version

Ohai that comes with Chef v14.11.21

Platform Version

All

Raboo avatar Apr 02 '19 15:04 Raboo