Class: Gusteau::Node
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Instance Method Summary collapse
- #apply(run_list, opts = {}) ⇒ Object
- #converge(opts = {}) ⇒ Object
-
#initialize(node_name, node_config) ⇒ Node
constructor
A new instance of Node.
- #ssh ⇒ Object
- #to_s ⇒ Object
Methods included from Log
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/gusteau/node.rb', line 7 def config @config end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/gusteau/node.rb', line 7 def name @name end |
#server ⇒ Object (readonly)
Returns the value of attribute server.
7 8 9 |
# File 'lib/gusteau/node.rb', line 7 def server @server end |
Instance Method Details
#apply(run_list, opts = {}) ⇒ Object
27 28 29 30 31 |
# File 'lib/gusteau/node.rb', line 27 def apply(run_list, opts = {}) with_hooks do server.chef.run dna(run_list), opts end end |
#converge(opts = {}) ⇒ Object
21 22 23 24 25 |
# File 'lib/gusteau/node.rb', line 21 def converge(opts = {}) with_hooks do server.chef.run dna, opts end end |
#ssh ⇒ Object
33 34 35 |
# File 'lib/gusteau/node.rb', line 33 def ssh server.ssh end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/gusteau/node.rb', line 17 def to_s "#{name} (#{@server})" end |