Class: Ansible::Inventory::Group

Inherits:
Struct
  • Object
show all
Defined in:
lib/ansible/inventory.rb

Defined Under Namespace

Classes: Collection

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Group

Returns a new instance of Group.



97
98
99
100
101
# File 'lib/ansible/inventory.rb', line 97

def initialize(*args)
  super
  self.hosts = Host::Collection.new unless hosts
  self.vars = {} unless vars
end

Instance Attribute Details

#hostsObject

Returns the value of attribute hosts

Returns:

  • (Object)

    the current value of hosts



96
97
98
# File 'lib/ansible/inventory.rb', line 96

def hosts
  @hosts
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



96
97
98
# File 'lib/ansible/inventory.rb', line 96

def name
  @name
end

#varsObject

Returns the value of attribute vars

Returns:

  • (Object)

    the current value of vars



96
97
98
# File 'lib/ansible/inventory.rb', line 96

def vars
  @vars
end