Bug #1770
Rundeckfacts "undefined method fact"
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
fixes #1770 - Refactored rdeckfacts definition to use facts_hash
(cherry picked from commit 86e9a056e5a1d24b9532674d5f14762a1bd9ab78)
History
#1
Updated by Markus Nussdorfer over 9 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 9 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 9 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset 86e9a056e5a1d24b9532674d5f14762a1bd9ab78.
#4
Updated by Dominic Cleal about 9 years ago
- Target version set to 1.3.0
#5
Updated by Dominic Cleal about 9 years ago
- Target version changed from 1.3.0 to 1.2.1
fixes #1770 - Refactored rdeckfacts definition to use facts_hash