Bug #6666
closedforeman-rake puppet:rdoc:generate doesn't work with puppet 3.6
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1120698
Description of problem:
To be able to generate the documentation for puppet classes accessible from foreman ui -> puppet classes -> the environment links in documentation column,
`foreman-rake puppet:rdoc:generate` needs to be run. However, it expects puppetdoc command to be present. It seems, puppet 3.6 does not ship this script, and `puppet doc` should be used instead.
Even after the path is changes, there are still issues when loading the information about the puppet environments from the master:
foreman-rake puppet:rdoc:generate --trace
undefined method `keys' for ["motd", motd]:Array
/usr/share/foreman/app/models/environment.rb:45:in `block (2 levels) in puppetEnvs'
/usr/share/foreman/app/models/environment.rb:44:in `each'
/usr/share/foreman/app/models/environment.rb:44:in `map'
/usr/share/foreman/app/models/environment.rb:44:in `block in puppetEnvs'
/usr/share/foreman/app/models/environment.rb:43:in `map'
/usr/share/foreman/app/models/environment.rb:43:in `puppetEnvs'
/usr/share/foreman/app/models/puppetclass.rb:102:in `rdoc'
/usr/share/foreman/lib/tasks/puppet.rake:17:in `block (3 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
Version-Release number of selected component (if applicable):
How reproducible:
Always
Steps to Reproduce:
1. create a content view with a puppet module and publish
2. run the `foreman-rake puppet:rdoc:generate`
Actual results:
Foreman is trying to use puppetdoc script, and even after fixing this, it fails on other errors
Expected results:
Additional info: