Class: Moose::Inventory::Operations::InventorySnapshot

Inherits:
Object
  • Object
show all
Defined in:
lib/moose_inventory/operations/inventory_snapshot.rb

Overview

Builds a canonical, portable representation of the current inventory.

Constant Summary collapse

VERSION =
1

Instance Method Summary collapse

Constructor Details

#initialize(context:) ⇒ InventorySnapshot

Returns a new instance of InventorySnapshot.



10
11
12
# File 'lib/moose_inventory/operations/inventory_snapshot.rb', line 10

def initialize(context:)
  @context = context
end

Instance Method Details

#exportObject



14
15
16
17
18
19
20
# File 'lib/moose_inventory/operations/inventory_snapshot.rb', line 14

def export
  {
    'version' => VERSION,
    'hosts' => export_hosts,
    'groups' => export_groups
  }
end