Sha256: 72138209c92acc94ab95c00ef947a6425ec3ce5198c30755cf090d2a1bd8fe5f

Contents?: true

Size: 674 Bytes

Versions: 29

Compression:

Stored size: 674 Bytes

Contents

module ForemanAnsible
  # On 1.13+ , use the parser for structured facts (like Facter 2) that comes
  # from core
  class StructuredFactImporter < ::StructuredFactImporter
    def fact_name_class
      ForemanAnsible::FactName
    end

    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
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
foreman_ansible-2.2.9 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.2.8 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.2.7 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.2.6 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.2.5 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.2.4 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.2.3 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.2.2 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.2.1 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.2.0 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.1.2 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.1.1 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.0.4 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.0.3 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.0.2 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-1.5.2 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-1.5.1 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-1.5.0 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.1.0 app/services/foreman_ansible/structured_fact_importer.rb
foreman_ansible-2.0.1 app/services/foreman_ansible/structured_fact_importer.rb