From 4a176e9ee6632cf4104d523efb8a37c639cd05a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=BE=D0=BC=D0=B0=D0=BD=20=D0=91=D0=B5=D0=BB=D1=8F?= =?UTF-8?q?=D0=BA=D0=BE=D0=B2=D1=81=D0=BA=D0=B8=D0=B8=CC=86?= Date: Mon, 26 Oct 2015 21:13:04 +0300 Subject: [PATCH] ansible-cmdb 1.6 (new formula) --- Library/Formula/ansible-cmdb.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Library/Formula/ansible-cmdb.rb diff --git a/Library/Formula/ansible-cmdb.rb b/Library/Formula/ansible-cmdb.rb new file mode 100644 index 000000000000..1183c2e09b7b --- /dev/null +++ b/Library/Formula/ansible-cmdb.rb @@ -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