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


121
122
123
124
125
126
# File 'lib/ansible/inventory.rb', line 121

def initialize(*args)
  super
  self.hosts = Host::Collection.new unless hosts
  self.vars = ActiveSupport::HashWithIndifferentAccess.new(vars)
  self.children = []
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children

Returns:

  • (Object)

    the current value of children


120
121
122
# File 'lib/ansible/inventory.rb', line 120

def children
  @children
end

#hostsObject

Returns the value of attribute hosts

Returns:

  • (Object)

    the current value of hosts


120
121
122
# File 'lib/ansible/inventory.rb', line 120

def hosts
  @hosts
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name


120
121
122
# File 'lib/ansible/inventory.rb', line 120

def name
  @name
end

#varsObject

Returns the value of attribute vars

Returns:

  • (Object)

    the current value of vars


120
121
122
# File 'lib/ansible/inventory.rb', line 120

def vars
  @vars
end