Sha256: 3e105ba2fbfeb55c891e1705d486da4585cbfae3d0f167144a1e021cf338ff5b

Contents?: true

Size: 359 Bytes

Versions: 43

Compression:

Stored size: 359 Bytes

Contents

module ForemanPuppet
  module HostInfoProviders
    class ConfigGroupsInfo < HostInfo::Provider
      def host_info
        return {} unless host.puppet

        config_groups = (host.puppet.config_groups + host.puppet.parent_config_groups).uniq.map(&:name)
        { 'parameters' => { 'foreman_config_groups' => config_groups } }
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
foreman_puppet-1.0.1 app/services/foreman_puppet/host_info_providers/config_groups_info.rb
foreman_puppet-1.0.0 app/services/foreman_puppet/host_info_providers/config_groups_info.rb
foreman_puppet-1.0.0.rc.2 app/services/foreman_puppet/host_info_providers/config_groups_info.rb