Class: PoolParty::Plugin::Host
- Inherits:
-
PoolParty::Plugin
- Object
- PoolParty::Plugin
- PoolParty::Plugin::Host
- Defined in:
- lib/poolparty/plugins/host.rb
Overview
Host
The host parameter sets hosts on the instances. Setting this, every node will have the host.
Usage
has_host(:name => '...') do
# More options.
# This block is optional
end
Options
-
name
The name of the instance -
ip
IP address of the instance for the host entry
Examples
has_host({:name => "other_machine", :ip => 192.168.0.101 })
Instance Method Summary collapse
Methods included from PoolParty::Plugin
Instance Method Details
#loaded(o = {}, &block) ⇒ Object
32 33 34 |
# File 'lib/poolparty/plugins/host.rb', line 32 def loaded(o={},&block) has_line_in_file(:file => "/etc/hosts", :line => "#{o[:ip]} #{o[:name]}") end |