ansible-cmdb 1.6 (new formula)
Closes Homebrew/homebrew#45344. Signed-off-by: Andrew Janke <andrew@apjanke.net>
This commit is contained in:
parent
57d702fd4b
commit
1e7846e784
1 changed files with 28 additions and 0 deletions
28
Formula/ansible-cmdb.rb
Normal file
28
Formula/ansible-cmdb.rb
Normal 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
|
Loading…
Reference in a new issue