Sha256: 8a1b3fd80962f349a742bcb5849f365b009f893a231fe934a89f0926a2b95fb0
Contents?: true
Size: 1.16 KB
Versions: 28
Compression:
Stored size: 1.16 KB
Contents
=begin rdoc == Route Manage the system routing table. == Usage has_route "10.0.0.1" do gateway "10.0.0.20" metric 5 route_type :net netmask "255.255.0.0" end == Options * <tt>gateway</tt> The gateway for the route * <tt>metric</tt> The route metric as an integer * <tt>route_type</tt> The type of route as a symbol, either :host or :net * <tt>netmask</tt> The decimal representation of the network mask eg 255.255.255.0 * <tt>device</tt> Network interface to apply this route to =end module PoolParty module Resources class Route < Directory default_options( :gateway => nil, :metric => nil, :route_type => :host, :netmask => nil, :device => nil ) def print_to_chef str = <<-EOE route "<%= name %>" do gateway <%= print_variable(gateway) %> metric <%= print_variable(metric) %> route_type <%= print_variable(route_type) %> netmask <%= print_variable(netmask) %> action :<%= exists? ? :add : :delete %> EOE str << " device <%= print_variable(device) %>\n" if device str << "end" end end end end
Version data entries
28 entries across 28 versions & 3 rubygems