PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/resolvers/solaris/ |
| Server: Linux server1.ngambekcore.com 4.18.0-553.51.1.el8_10.x86_64 #1 SMP Wed Apr 30 04:00:07 EDT 2025 x86_64 IP: 159.198.77.92 |
| Dir : //opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/resolvers/solaris/zone.rb |
# frozen_string_literal: true
module Facter
module Resolvers
module Solaris
class Zone < BaseResolver
init_resolver
class << self
private
def post_resolve(fact_name, _options)
@fact_list.fetch(fact_name) { build_zone_fact(fact_name) }
end
def build_zone_fact(fact_name)
command = '/usr/sbin/zoneadm list -cp'
zone_adm_output = Facter::Core::Execution.execute(command, logger: log)
if zone_adm_output.empty?
log.debug("Command #{command} returned an empty result")
return
end
@fact_list[:zone] = create_zone_facts(zone_adm_output)
@fact_list[fact_name]
end
def create_zone_facts(zones_result)
zones_fact = []
zones_result.each_line do |zone_line|
id, name, status, path, uuid, brand, ip_type = zone_line.split(':')
zones_fact << {
brand: brand,
id: id,
iptype: ip_type.chomp,
name: name,
uuid: uuid,
status: status,
path: path
}
end
zones_fact
end
end
end
end
end
end