Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Parsing keepalived's configuration for reading and writing

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 script
Octocat-spinner-32 spec
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 TODO
Octocat-spinner-32 keepalived_dot_conf.gemspec
README
keepalived_dot_conf
===================

A gem that provides parsing of keepalived's config file


usage
=====

mpro% irb
>> require 'lib/keepalived_dot_conf'
=> true
>> require 'pp'
=> true
>> pp KeepAlived::Parser.new.parse(File.read("spec/fixtures/keepalived.conf")).eval({})[:virtual_servers].first
#<KeepAlivedConfigFile::AST::VirtualServer:0x12f8108
 @delay_loop="6",
 @ip="192.168.0.1",
 @lb_algo="lc",
 @lb_kind="NAT",
 @nat_mask="255.255.255.0",
 @persistence_timeout="0",
 @port="80",
 @protocol="TCP",
 @sorry_server=
  #<KeepAlivedConfigFile::AST::IpMapping:0x12f8068
   @ip="127.0.0.1",
   @port="80">,
 @virtualhost=nil>
=> nil
Something went wrong with that request. Please try again.