2015-10-26 18:13:04 +00:00
|
|
|
class AnsibleCmdb < Formula
|
|
|
|
desc "Generates static HTML overview page from Ansible facts"
|
|
|
|
homepage "https://github.com/fboender/ansible-cmdb"
|
2016-01-04 14:41:57 +00:00
|
|
|
url "https://github.com/fboender/ansible-cmdb/releases/download/1.10/ansible-cmdb-1.10.zip"
|
|
|
|
sha256 "9234f77624ba174721ef8d0ecd2717d73fc3a1e9393a65289be29f08ec4b370e"
|
2015-10-26 18:13:04 +00:00
|
|
|
|
2015-11-27 10:48:33 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2016-01-04 15:56:22 +00:00
|
|
|
sha256 "e886c5b02528a236d41ac50463243993bba9c1a7777f41e9edfdaf9420eaf345" => :el_capitan
|
|
|
|
sha256 "771548249a6b1e7526d83ad4ce9a482a138b78095d094347b79ef52e2cc65732" => :yosemite
|
|
|
|
sha256 "4822b7270469a352dbc742ac75e659111ad3f841b2b58d68570551298e3de9eb" => :mavericks
|
2015-11-27 10:48:33 +00:00
|
|
|
end
|
|
|
|
|
2015-10-26 18:13:04 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
|
|
depends_on "libyaml"
|
|
|
|
|
|
|
|
def install
|
|
|
|
bin.mkpath
|
2016-01-04 14:41:57 +00:00
|
|
|
man1.mkpath
|
2015-10-26 18:13:04 +00:00
|
|
|
inreplace "Makefile" do |s|
|
|
|
|
s.gsub! "/usr/local/lib/${PROG}", prefix
|
|
|
|
s.gsub! "/usr/local/bin", bin
|
2016-01-04 14:41:57 +00:00
|
|
|
s.gsub! "/usr/local/share/man/man1/", man1 + 'ansible-cmdb.1'
|
|
|
|
s.gsub! "mandb", "#mandb"
|
2015-10-26 18:13:04 +00:00
|
|
|
end
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"hosts").write <<-EOS.undent
|
|
|
|
[brew_test]
|
|
|
|
brew1 dtap=dev comment='Old database server'
|
|
|
|
brew2 dtap=dev comment='New database server'
|
|
|
|
EOS
|
|
|
|
system "#{bin}/ansible-cmdb", "-dt", "html_fancy", "."
|
|
|
|
end
|
|
|
|
end
|