Sha256: 2929d209768dbdad7b973ee7f44f552a60af45eca347bfe361b24144ea71659d

Contents?: true

Size: 563 Bytes

Versions: 8

Compression:

Stored size: 563 Bytes

Contents

require 'tempfile'

namespace :foreman_inventory_upload do
  namespace :report do
    desc 'Generate inventory report to be sent to Red Hat cloud'
    task generate: :environment do
      target = ENV['target'] || ForemanInventoryUpload.facts_archive_name
      portal_user = ENV['portal_user'] || 'anonymous'

      archived_report_generator = ForemanInventoryUpload::Generators::ArchivedReport.new(target, Logger.new(STDOUT))
      archived_report_generator.render(portal_user)
      puts "Successfully generated #{target} for #{portal_user}"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foreman_inventory_upload-1.0.0.beta7 lib/tasks/generator.rake
foreman_inventory_upload-1.0.0.beta6 lib/tasks/generator.rake
foreman_inventory_upload-1.0.0.beta5 lib/tasks/generator.rake
foreman_inventory_upload-1.0.0.beta4 lib/tasks/generator.rake
foreman_inventory_upload-1.0.0.beta3 lib/tasks/generator.rake
foreman_inventory_upload-1.0.0.beta2 lib/tasks/generator.rake
foreman_inventory_upload-1.0.0.beta1 lib/tasks/generator.rake
foreman_inventory_upload-0.0.1.dev1 lib/tasks/generator.rake