ansible-cmdb 1.6 (new formula)

Closes Homebrew/homebrew#45344.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
This commit is contained in:
Роман Беляковский 2015-10-26 21:13:04 +03:00 committed by Andrew Janke
parent 57d702fd4b
commit 1e7846e784

28
Formula/ansible-cmdb.rb Normal file
View file

@ -0,0 +1,28 @@
class AnsibleCmdb < Formula
desc "Generates static HTML overview page from Ansible facts"
homepage "https://github.com/fboender/ansible-cmdb"
url "https://github.com/fboender/ansible-cmdb/releases/download/1.6/ansible-cmdb-1.6.zip"
sha256 "a201207d1a8b8929f07bd28be0ca3f1224e9ecf296756b73d938b6a41bdde80e"
depends_on :python if MacOS.version <= :snow_leopard
depends_on "libyaml"
def install
bin.mkpath
inreplace "Makefile" do |s|
s.gsub! "/usr/local/lib/${PROG}", prefix
s.gsub! "/usr/local/bin", bin
end
inreplace "ansible-cmdb", "(bin_dir, '..', 'lib', 'ansible-cmdb')", "(bin_dir, '..')"
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