Project

General

Profile

Bug #1770

Rundeckfacts "undefined method fact"

Added by Hannes Schaller about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Hello!

When I add "rundeckfacts" = "is_virtual" to the Global Paramaters, the Rundeck YML download breaks with the following error:

Failed to fetch rundeck info for myserver.at.internal: undefined method `fact' for #<Host:0x7fec3ad4c1e0>

The problem seems to be on http://theforeman.org/projects/foreman/repository/revisions/develop/entry/app/models/host.rb#L574

Unfortunately due to my lack of Rails Know-How I am not able to provide a patch for now.

Thanks in advance!

Associated revisions

Revision 86e9a056 (diff)
Added by Andy Bohne about 6 years ago

fixes #1770 - Refactored rdeckfacts definition to use facts_hash

Revision 43334ff4 (diff)
Added by Andy Bohne about 6 years ago

fixes #1770 - Refactored rdeckfacts definition to use facts_hash
(cherry picked from commit 86e9a056e5a1d24b9532674d5f14762a1bd9ab78)

History

#1 Updated by Markus Nussdorfer over 6 years ago

Hi

having the same issue here.

Im not a dev, but following line
rdecktags += self.params["rundeckfacts"].split(",").map{|rdf| "#{rdf}=#{fact(rdf)[0].value}"}

#2 Updated by Andy Bohne about 6 years ago

I have submitted a pull request that fixes this functionality.

https://github.com/theforeman/foreman/pull/752

This can be backported to 1.1. Simply make the required changes to app/models/host.rb.

#3 Updated by Anonymous about 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

#4 Updated by Dominic Cleal about 6 years ago

  • Target version set to 1.3.0

#5 Updated by Dominic Cleal about 6 years ago

  • Target version changed from 1.3.0 to 1.2.1

Also available in: Atom PDF