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-10-22 14:00:38 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/6b/51/52596a541dbda4ef137357933a48ef0c5c4e67237dc804b6bc3a278113f8/ansible-lint-3.4.17.tar.gz"
|
|
|
|
sha256 "9cebc110019f52a7dd66cb785d99d43b556f246c3046661b00c7bcfe74a9504d"
|
2017-04-23 21:14:03 +00:00
|
|
|
|
2017-04-25 18:12:49 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2017-10-22 16:02:26 +00:00
|
|
|
sha256 "78321748a1ebbdcff6c745640151487ce6596f96dd9c303521dafd9051013b19" => :high_sierra
|
|
|
|
sha256 "3eebb118d6f62674b1266c9e3e09d7737829e82b3dc94f4e4dfbf618948d1d21" => :sierra
|
|
|
|
sha256 "10dc62cbf53acef2c02add9d8cb6337ba32646195af26a0599ee13c0a70c295c" => :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-10-02 23:16:53 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/1e/7c/385ccbeb0fbefc13eaef53df76e42ef778170bdfe5fd425879735b43106e/ansible-2.4.0.0.tar.gz"
|
|
|
|
sha256 "1a276fee7f72d4e6601a7994879e8467edb763dacc3e215258cfe71350b77c76"
|
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-10-22 14:00:38 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/bf/da/6a9f49cc7a970380c8235b3adab0c08c7c3d4814876f7383b33e3882a577/cryptography-2.1.1.tar.gz"
|
|
|
|
sha256 "2699ed21e1f73dd1bdb7b0b22a517295de07809d535b23e200dd22166037fe6f"
|
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
|
|
|
|
url "https://files.pythonhosted.org/packages/90/61/f820ff0076a2599dd39406dcb858ecb239438c02ce706c8e91131ab9c7f1/Jinja2-2.9.6.tar.gz"
|
|
|
|
sha256 "ddaa01a212cd6d641401cb01b605f4a4d9f37bfc93043d7f760ec70fb99ff9ff"
|
|
|
|
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-10-02 23:16:53 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/83/78/4569a543ef2cb304e9b82387f555021c13a845d0ad1e2bb59272ade67669/paramiko-2.3.1.tar.gz"
|
|
|
|
sha256 "fa6b4f5c9d88f27c60fd9578146ff24e99d4b9f63391ff1343305bfd766c4660"
|
2017-04-23 21:14:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "pyasn1" do
|
2017-10-22 14:00:38 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/3c/a6/4d6c88aa1694a06f6671362cb3d0350f0d856edea4685c300785200d1cd9/pyasn1-0.3.7.tar.gz"
|
|
|
|
sha256 "187f2a66d617683f8e82d5c00033b7c8a0287e1da88a9d577aebec321cad4965"
|
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
|
|
|
|
|
|
|
|
resource "pycrypto" do
|
|
|
|
url "https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz"
|
|
|
|
sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c"
|
|
|
|
end
|
|
|
|
|
2017-09-03 16:59:27 +00:00
|
|
|
resource "PyNaCl" do
|
|
|
|
url "https://files.pythonhosted.org/packages/8d/f3/02605b056e465bf162508c4d1635a2bccd9abd1ee3ed2a1bb4e9676eac33/PyNaCl-1.1.2.tar.gz"
|
|
|
|
sha256 "32f52b754abf07c319c04ce16905109cab44b0e7f7c79497431d3b2000f8af8c"
|
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
|