Project

General

Profile

Actions

Bug #26180

closed

puppet-certs does not work with 'puppet generate types'

Added by Trey Dockendorf about 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Foreman modules
Target version:
Found in Releases:

Description

Content copied from https://github.com/theforeman/puppet-certs/issues/247

The use of `certs_common` in `types` directory breaks type generation because it's not actually a valid type.

# /opt/puppetlabs/bin/puppet generate types --environment production --trace --debug
<SNIP>
Debug: Skipping '/etc/puppetlabs/code/environments/production/modules/certs/lib/puppet/type/ca.rb' because it is up-to-date.
Debug: Skipping '/etc/puppetlabs/code/environments/production/modules/certs/lib/puppet/type/cert.rb' because it is up-to-date.
Debug: Skipping '/etc/puppetlabs/code/environments/production/modules/certs/lib/puppet/type/certs_bootstrap_rpm.rb' because it is up-to-date.
Debug: Loading custom type 'certs_common' in '/etc/puppetlabs/code/environments/production/modules/certs/lib/puppet/type/certs_common.rb'.
Error: undefined method `[]' for nil:NilClass
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/generate/type.rb:198:in `block in generate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/generate/type.rb:174:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/generate/type.rb:174:in `generate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/face/generate.rb:60:in `block (3 levels) in <top (required)>'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/interface/action.rb+eval[wrapper]:264:in `types'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/face_base.rb:247:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:383:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:667:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:135:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
Error: Try 'puppet help generate types' for usage
Actions

Also available in: Atom PDF