Sha256: c7938d9e64940352ce06f3882afd542cccefe9110f6ec32853dd68814472a5ca
Contents?: true
Size: 808 Bytes
Versions: 7
Compression:
Stored size: 808 Bytes
Contents
namespace :katello do namespace :receptor do desc 'Extract Organization details for Receptor and write to OUTPUT_FILE.' task :extract_orgs => ["dynflow:client", "check_ping"] do output_file = ENV['OUTPUT_FILE'] unless output_file fail("The OUTPUT_FILE environment variable must be specified") end data = Organization.with_upstream_pools.map do |org| { id: org.id, redhat_account_number: org.redhat_account_number, cert: org.owner_details.dig(:upstreamConsumer, :idCert, :cert), key: org.owner_details.dig(:upstreamConsumer, :idCert, :key), } end File.write(output_file, JSON.pretty_generate(data)) puts "Wrote results to #{output_file}. Please delete it when finished." end end end
Version data entries
7 entries across 7 versions & 1 rubygems