Class: Ansible::Inventory::Host

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(name, hash = {}) ⇒ Host


92
93
94
95
# File 'lib/ansible/inventory.rb', line 92

def initialize(name, hash = {})
  super(name)
  self.vars = ActiveSupport::HashWithIndifferentAccess.new(hash)
end

Instance Attribute Details

#nameObject

Returns the value of attribute name


91
92
93
# File 'lib/ansible/inventory.rb', line 91

def name
  @name
end

#varsObject

Returns the value of attribute vars


91
92
93
# File 'lib/ansible/inventory.rb', line 91

def vars
  @vars
end

Instance Method Details

#==(other) ⇒ Object


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

def ==(other)
  (name == other.name) && (vars == other.vars)
end