Class: ForemanAnsible::StructuredFactImporter
- Inherits:
-
StructuredFactImporter
- Object
- StructuredFactImporter
- ForemanAnsible::StructuredFactImporter
- Defined in:
- app/services/foreman_ansible/structured_fact_importer.rb
Overview
On 1.13+ , use the parser for structured facts (like Facter 2) that comes from core
Class Method Summary collapse
Instance Method Summary collapse
- #fact_name_class ⇒ Object
-
#initialize(host, facts = {}) ⇒ StructuredFactImporter
constructor
A new instance of StructuredFactImporter.
Constructor Details
#initialize(host, facts = {}) ⇒ StructuredFactImporter
Returns a new instance of StructuredFactImporter.
15 16 17 18 19 20 21 22 23 |
# File 'app/services/foreman_ansible/structured_fact_importer.rb', line 15 def initialize(host, facts = {}) # Try to assign these facts to the correct host as per the facts say # If that host isn't created yet, the host parameter will contain it @host = Host.find_by(:name => facts[:ansible_facts][:ansible_fqdn] || facts[:ansible_facts][:fqdn]) || host @facts = normalize(facts[:ansible_facts]) @counters = {} end |
Class Method Details
.authorized_smart_proxy_features ⇒ Object
11 12 13 |
# File 'app/services/foreman_ansible/structured_fact_importer.rb', line 11 def self. 'Ansible' end |
Instance Method Details
#fact_name_class ⇒ Object
7 8 9 |
# File 'app/services/foreman_ansible/structured_fact_importer.rb', line 7 def fact_name_class ForemanAnsible::FactName end |