2017-04-23 21:14:03 +00:00
|
|
|
class AnsibleLint < Formula
|
|
|
|
include Language::Python::Virtualenv
|
|
|
|
|
|
|
|
desc "Checks ansible playbooks for practices and behaviour"
|
|
|
|
homepage "https://github.com/willthames/ansible-lint/"
|
2017-12-10 09:05:32 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/b6/02/aeb55b9eb7ac404b5cccfe6a4505bec641fe78fae7cb12e2632d639ff55c/ansible-lint-3.4.19.tar.gz"
|
|
|
|
sha256 "7ce9122e80ceed063e13c47c7430dbc541838a47cf560d3bcd87a0982a429877"
|
2017-04-23 21:14:03 +00:00
|
|
|
|
2017-04-25 18:12:49 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2017-12-07 14:07:21 +00:00
|
|
|
sha256 "bc997c6445a936c0f6962cfab1d15e5eacfee4efe4776054a223da3d145c5d5d" => :high_sierra
|
|
|
|
sha256 "d3209a399f40c359751d7dddf80b72b5121682a60eafd88a46f504bc98ef51f2" => :sierra
|
|
|
|
sha256 "83e799d72bf026b91b7d04d3cafd4ac35fb364bc3c06dbdca80e004a5b37d86a" => :el_capitan
|
2017-04-25 18:12:49 +00:00
|
|
|
end
|
|
|
|
|
2017-04-23 21:14:03 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on :python
|
|
|
|
depends_on "libyaml"
|
|
|
|
depends_on "openssl@1.1"
|
|
|
|
|
|
|
|
resource "ansible" do
|
2017-12-07 06:53:07 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/4f/65/ae3ad8589c38f9e04ebc8a824c2880eb4f9e603a1f62b5f5a3f938e524b0/ansible-2.4.2.0.tar.gz"
|
|
|
|
sha256 "315f1580b20bbc2c2f1104f8b5e548c6b4cac943b88711639c5e0d4dfc4d7658"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "asn1crypto" do
|
2017-10-02 23:16:53 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/31/53/8bca924b30cb79d6d70dbab6a99e8731d1e4dd3b090b7f3d8412a8d8ffbc/asn1crypto-0.23.0.tar.gz"
|
|
|
|
sha256 "0874981329cfebb366d6584c3d16e913f2a0eb026c9463efcc4aaf42a9d94d70"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
2017-09-03 16:59:27 +00:00
|
|
|
resource "bcrypt" do
|
2017-10-22 14:00:38 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/f3/ec/bb6b384b5134fd881b91b6aa3a88ccddaad0103857760711a5ab8c799358/bcrypt-3.1.4.tar.gz"
|
|
|
|
sha256 "67ed1a374c9155ec0840214ce804616de49c3df9c5bc66740687c1c9b1cd9e8d"
|
2017-09-03 16:59:27 +00:00
|
|
|
end
|
|
|
|
|
2017-04-23 21:14:03 +00:00
|
|
|
resource "cffi" do
|
2017-10-22 14:00:38 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz"
|
|
|
|
sha256 "ab87dd91c0c4073758d07334c1e5f712ce8fe48f007b86f8238773963ee700a6"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "cryptography" do
|
2017-12-07 06:53:07 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/78/c5/7188f15a92413096c93053d5304718e1f6ba88b818357d05d19250ebff85/cryptography-2.1.4.tar.gz"
|
|
|
|
sha256 "e4d967371c5b6b2e67855066471d844c5d52d210c36c28d49a8507b96e2c5291"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "enum34" do
|
|
|
|
url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz"
|
|
|
|
sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "idna" do
|
2017-09-03 16:59:27 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3/idna-2.6.tar.gz"
|
|
|
|
sha256 "2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "ipaddress" do
|
|
|
|
url "https://files.pythonhosted.org/packages/4e/13/774faf38b445d0b3a844b65747175b2e0500164b7c28d78e34987a5bfe06/ipaddress-1.0.18.tar.gz"
|
|
|
|
sha256 "5d8534c8e185f2d8a1fda1ef73f2c8f4b23264e8e30063feeb9511d492a413e1"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "Jinja2" do
|
2017-12-07 06:53:07 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz"
|
|
|
|
sha256 "f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "MarkupSafe" do
|
|
|
|
url "https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz"
|
|
|
|
sha256 "a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "paramiko" do
|
2017-12-07 06:53:07 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/c8/de/791773d6a4b23327c7475ae3d7ada0d07fa147bf77fb6f561a4a7d8afd11/paramiko-2.4.0.tar.gz"
|
|
|
|
sha256 "486f637f0a33a4792e0e567be37426c287efaa8c4c4a45e3216f9ce7fd70b1fc"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "pyasn1" do
|
2017-12-07 06:53:07 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/eb/3d/b7d0fdf4a882e26674c68c20f40682491377c4db1439870f5b6f862f76ed/pyasn1-0.4.2.tar.gz"
|
|
|
|
sha256 "d258b0a71994f7770599835249cece1caef3c70def868c4915e6e5ca49b67d15"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "pycparser" do
|
2017-09-03 16:59:27 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz"
|
|
|
|
sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
2017-09-03 16:59:27 +00:00
|
|
|
resource "PyNaCl" do
|
2017-12-07 06:53:07 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/08/19/cf56e60efd122fa6d2228118a9b345455b13ffe16a14be81d025b03b261f/PyNaCl-1.2.1.tar.gz"
|
|
|
|
sha256 "e0d38fa0a75f65f556fb912f2c6790d1fa29b7dd27a1d9cc5591b281321eaaa9"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "PyYAML" do
|
|
|
|
url "https://files.pythonhosted.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz"
|
|
|
|
sha256 "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "six" do
|
2017-10-02 23:16:53 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz"
|
|
|
|
sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
virtualenv_install_with_resources
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp"
|
2017-10-18 12:55:14 +00:00
|
|
|
(testpath/"playbook.yml").write <<~EOS
|
2017-04-23 21:14:03 +00:00
|
|
|
---
|
|
|
|
- hosts: all
|
|
|
|
gather_facts: False
|
|
|
|
tasks:
|
|
|
|
- name: ping
|
|
|
|
ping:
|
2017-10-18 12:55:14 +00:00
|
|
|
EOS
|
2017-04-23 21:14:03 +00:00
|
|
|
system bin/"ansible-lint", testpath/"playbook.yml"
|
|
|
|
end
|
|
|
|
end
|