Class: BarkingIguana::Compound::Ansible::Inventory
- Inherits:
-
Object
- Object
- BarkingIguana::Compound::Ansible::Inventory
- Defined in:
- lib/barking_iguana/compound/ansible/inventory.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #hostgroups ⇒ Object
- #hosts ⇒ Object
-
#initialize(path) ⇒ Inventory
constructor
A new instance of Inventory.
Constructor Details
#initialize(path) ⇒ Inventory
Returns a new instance of Inventory.
8 9 10 |
# File 'lib/barking_iguana/compound/ansible/inventory.rb', line 8 def initialize path self.path = path end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
5 6 7 |
# File 'lib/barking_iguana/compound/ansible/inventory.rb', line 5 def path @path end |
Instance Method Details
#hostgroups ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/barking_iguana/compound/ansible/inventory.rb', line 12 def hostgroups hg = InventoryParser.load_targets path hg.reject! do |k,v| k =~ /:vars$/ end hg end |