Sha256: 75804b95c3cc2570c892cca93c6e828d21f449477d35ebd8bcdcd01ad91feb6e
Contents?: true
Size: 483 Bytes
Versions: 76
Compression:
Stored size: 483 Bytes
Contents
module ForemanAnsible class AnsibleInfo < ::HostInfo::Provider def host_info { 'parameters' => ansible_params } end def ansible_params variables = AnsibleVariable.where(:ansible_role_id => host.all_ansible_roles.pluck(:id), :override => true) values = variables.values_hash(host) variables.each_with_object({}) do |var, memo| value = values[var] memo[var.key] = value unless value.nil? memo end end end end
Version data entries
76 entries across 76 versions & 1 rubygems