Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
ansible-cmdb 1.6 (new formula)
Browse files Browse the repository at this point in the history
Closes #45344.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
  • Loading branch information
hryamzik authored and apjanke committed Nov 27, 2015
1 parent 27be1d2 commit 3dcf732
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions 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

0 comments on commit 3dcf732

Please sign in to comment.