The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #5674

resource auto-search/auto-loading doesn't work in ruby dsl

Added by Yuri Arabadji over 3 years ago. Updated 11 months ago.

Status:ClosedStart date:12/25/2010
Priority:NormalDue date:
Assignee:eric sorenson% Done:

0%

Category:language
Target version:-
Affected Puppet version:2.6.4 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

It just doesn’t work.

.pp:

node 'default' {
    testo::seconddef { 'secdef_rsrc': }
}

**notice: Scope(Testo::Seconddef[secdef_rsrc]): Define: second**

while with .rb:

node 'default' do
    create_resource 'testo::seconddef', 'secdef_rsrc'
end

**Cannot find definition Testo::Seconddef on node xxx**

Related issues

Related to Puppet - Feature #16937: Improved Ruby DSL Closed 10/11/2012

History

#1 Updated by James Turnbull over 3 years ago

  • Category set to language
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Nigel Kersten

This should work right Nigel?

#2 Updated by Nigel Kersten over 3 years ago

  • Status changed from Needs Decision to Accepted
  • Assignee deleted (Nigel Kersten)
  • Target version set to 2.7.x

#3 Updated by Egon Kastelijn almost 3 years ago

Can someone please assign this bug to a developer again?

kind regards,

Egon

#4 Updated by James Turnbull almost 3 years ago

Egon – it’s not assigned to anyone because it’s not currently being worked on. We’ve accepted the bug but it won’t be assigned until someone in development is available to work on the issue.

#5 Updated by Matthew Leather over 2 years ago

A workaround that seems to work for me (2.6.1) is adding this in the DSL before create_resource()

scope.find_definition('testo::seconddef')

#6 Updated by Andrew Parker over 1 year ago

  • Target version deleted (2.7.x)

#7 Updated by Andrew Parker over 1 year ago

As the 2.7.x line is winding down, I am removing the target at 2.7.x from tickets in the system. The 2.7 line should only receive fixes for major problems (crashes, for instance) or security problems.

#8 Updated by eric sorenson 11 months ago

  • Status changed from Accepted to Closed
  • Assignee set to eric sorenson

Closing as wont-fix — the ruby dsl is deprecated and will not receive fixes.

Also available in: Atom PDF