Issue #11912 has been updated by eric sorenson. Status changed from Accepted to Closed Assignee set to eric sorenson
Ruby dsl is deprecated and removed; won't fix this. ---------------------------------------- Bug #11912: Ruby DSL should be able to use defined resources https://projects.puppetlabs.com/issues/11912#change-97761 * Author: Hunter Haugen * Status: Closed * Priority: Normal * Assignee: eric sorenson * Category: language * Target version: 3.x * Affected Puppet version: * Keywords: rubydsl, ruby, dsl, define * Branch: ---------------------------------------- Currently there is no way to use defined resources in puppet ruby dsl. At all. Given a module called `test` with two defined resources: 1st: `test/manifests/def.pp` define test::def { notify { 'test': message => "Some test def for $name", } } 2nd: `test/manifests/ruby_def.rb` define 'test::ruby_def' do notify 'ruby test', :message => "Some ruby test def for $name" end I can use both of these from a normal puppet manifest just fine: `test/manifests/include.pp` class test::include { test::def { 'my title1': } test::ruby_def { 'my ruby title1': } } THE BUG: The following example does not work. Puppet Ruby DSL cannot use either ruby defines or puppet defines with `create_resource`, and there are no other alternatives to use them. So defined resources are not possible to use in the puppet ruby dsl afaict: `test/manifests/ruby_include.pp` hostclass 'test::ruby_include' do create_resource 'test::def', 'my title' create_resource 'test::ruby_def', 'my ruby title' end The errors given: Cannot find definition Test::Def on node training.puppetlabs.lan Cannot find definition Test::Ruby_def on node training.puppetlabs.lan -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
