class Rundock::Operation::HostInventory
You can use this sample as following scenario.yml for example.
-
node: anyhost-01 host_inventory:
memory: total:
anyhost-01:
host: 192.168.1.11 ssh_opts: port: 22 user: anyuser key: ~/.ssh/id_rsa
Public Instance Methods
run(backend, attributes)
click to toggle source
# File lib/rundock/plugin/operation/host_inventory.rb, line 20 def run(backend, attributes) attributes[:host_inventory].each do |hi| logging(to_inventory(backend, hi), 'info') end end
Private Instance Methods
to_inventory(backend, inventory)
click to toggle source
# File lib/rundock/plugin/operation/host_inventory.rb, line 28 def to_inventory(backend, inventory) ret = nil inventory.split('/').each do |s| if ret.nil? ret = backend.host_inventory[s.to_s] next end ret = ret[s.to_s] end ret end