2013-09-02 11:43:49 +00:00
|
|
|
class Ansible < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Automate deployment, configuration, and upgrading"
|
2014-10-15 11:29:54 +00:00
|
|
|
homepage "http://www.ansible.com/home"
|
2015-06-27 21:03:51 +00:00
|
|
|
url "http://releases.ansible.com/ansible/ansible-1.9.2.tar.gz"
|
|
|
|
sha256 "c25ef4738b08fdfb3094247c012f3fd1b29972acbd37f988070b2a85f5fbee00"
|
2013-09-02 11:43:49 +00:00
|
|
|
|
2014-10-15 11:29:54 +00:00
|
|
|
head "https://github.com/ansible/ansible.git", :branch => "devel"
|
2013-09-02 11:43:49 +00:00
|
|
|
|
2014-06-27 17:31:11 +00:00
|
|
|
bottle do
|
2015-06-29 02:57:14 +00:00
|
|
|
sha256 "84b991d2a81e2ec8a0329f0e5f91894a6ed6ad75fe8747e8adaf40da75feffec" => :yosemite
|
|
|
|
sha256 "9806adac0d52e2cd59bd6f87c93ede60b45c3f2fd9bdbd20cdfc942fc1c19920" => :mavericks
|
|
|
|
sha256 "2d40456fcf2f47e7ce8999b55010e30a5dfd972be8c4123a8157fddf2cfcf9ae" => :mountain_lion
|
2014-06-27 17:31:11 +00:00
|
|
|
end
|
|
|
|
|
2014-04-30 22:35:13 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
2014-10-15 11:29:54 +00:00
|
|
|
depends_on "libyaml"
|
2013-09-02 11:43:49 +00:00
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
#
|
|
|
|
# ansible (core dependencies)
|
|
|
|
#
|
|
|
|
resource "Jinja2" do
|
|
|
|
url "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz"
|
|
|
|
sha256 "2e24ac5d004db5714976a04ac0e80c6df6e47e98c354cb2c0d82f8879d4f8fdb"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "MarkupSafe" do
|
|
|
|
url "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz"
|
|
|
|
sha256 "a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "paramiko" do
|
2015-06-24 21:08:01 +00:00
|
|
|
url "https://pypi.python.org/packages/source/p/paramiko/paramiko-1.15.2.tar.gz"
|
|
|
|
sha256 "4f56a671a3eecbb76e6143e6e4ca007d503a39aa79aa9e14ade667fa53fd6e55"
|
2015-06-08 15:11:15 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "pycrypto" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz"
|
|
|
|
sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "PyYAML" do
|
|
|
|
url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.10.tar.gz"
|
|
|
|
sha256 "e713da45c96ca53a3a8b48140d4120374db622df16ab71759c9ceb5b8d46fe7c"
|
2014-11-16 16:32:20 +00:00
|
|
|
end
|
|
|
|
|
2015-06-24 21:08:01 +00:00
|
|
|
#
|
|
|
|
# Required by the 'paramiko' core module
|
|
|
|
# https://github.com/paramiko/paramiko)
|
|
|
|
#
|
|
|
|
resource "ecdsa" do
|
|
|
|
url "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-0.13.tar.gz"
|
|
|
|
sha256 "64cf1ee26d1cde3c73c6d7d107f835fed7c6a2904aef9eac223d57ad800c43fa"
|
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
#
|
|
|
|
# Required by the 'uri' core module
|
|
|
|
# See http://docs.ansible.com/uri_module.html#requirements)
|
|
|
|
#
|
|
|
|
resource "httplib2" do
|
|
|
|
url "https://pypi.python.org/packages/source/h/httplib2/httplib2-0.9.1.tar.gz"
|
|
|
|
sha256 "bc6339919a5235b9d1aaee011ca5464184098f0c47c9098001f91c97176583f5"
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# Resources required by docker-py and pyrax (see below)
|
|
|
|
#
|
2014-11-16 16:32:20 +00:00
|
|
|
resource "requests" do
|
2015-06-08 15:11:15 +00:00
|
|
|
url "https://pypi.python.org/packages/source/r/requests/requests-2.7.0.tar.gz"
|
|
|
|
sha256 "398a3db6d61899d25fd4a06c6ca12051b0ce171d705decd7ed5511517b4bb93d"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "six" do
|
|
|
|
url "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz"
|
|
|
|
sha256 "e24052411fc4fbd1f672635537c3fc2330d9481b18c0317695b46259512c91d5"
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# docker-py (for Docker support)
|
|
|
|
#
|
|
|
|
resource "backports.ssl_match_hostname" do
|
|
|
|
url "https://pypi.python.org/packages/source/b/backports.ssl_match_hostname/backports.ssl_match_hostname-3.4.0.2.tar.gz"
|
|
|
|
sha256 "07410e7fb09aab7bdaf5e618de66c3dac84e2e3d628352814dc4c37de321d6ae"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "docker-py" do
|
|
|
|
url "https://pypi.python.org/packages/source/d/docker-py/docker-py-1.2.2.tar.gz"
|
|
|
|
sha256 "4494d699059559118417da192a3d4bf015b097f7b589c48e253c12b4c61e5ef0"
|
2014-11-16 16:32:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "websocket-client" do
|
2015-06-08 15:11:15 +00:00
|
|
|
url "https://pypi.python.org/packages/source/w/websocket-client/websocket_client-0.32.0.tar.gz"
|
|
|
|
sha256 "cb3ab95617ed2098d24723e3ad04ed06c4fde661400b96daa1859af965bfe040"
|
2014-11-16 16:32:20 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
#
|
|
|
|
# pywinrm (for Windows support)
|
|
|
|
#
|
|
|
|
resource "isodate" do
|
|
|
|
url "https://pypi.python.org/packages/source/i/isodate/isodate-0.5.1.tar.gz"
|
|
|
|
sha256 "b12aed31c0e834543497e24d609a41531a800d8304c39e6665c45ca023b012fb"
|
2014-11-16 16:32:20 +00:00
|
|
|
end
|
2013-10-20 13:44:20 +00:00
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resource "pywinrm" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pywinrm/pywinrm-0.0.3.tar.gz"
|
|
|
|
sha256 "be3775890effcddfb1fca440b43bf08af165527a7b102d43518232bfc9c021bc"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "xmltodict" do
|
|
|
|
url "https://pypi.python.org/packages/source/x/xmltodict/xmltodict-0.9.2.tar.gz"
|
|
|
|
sha256 "275d1e68c95cd7e3ee703ddc3ea7278e8281f761680d6bdd637bcd00a5c59901"
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# kerberos (for Windows support)
|
|
|
|
#
|
|
|
|
resource "kerberos" do
|
|
|
|
url "https://pypi.python.org/packages/source/k/kerberos/kerberos-1.2.2.tar.gz"
|
|
|
|
sha256 "070ff6d9baf3752323283b1c8ed75e2edd0ec55337359185abf5bb0b617d2f5d"
|
2013-10-30 18:59:06 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
#
|
|
|
|
# boto (for AWS support)
|
|
|
|
#
|
2014-10-15 11:29:54 +00:00
|
|
|
resource "boto" do
|
2015-06-08 15:11:15 +00:00
|
|
|
url "https://pypi.python.org/packages/source/b/boto/boto-2.38.0.tar.gz"
|
|
|
|
sha256 "d9083f91e21df850c813b38358dc83df16d7f253180a1344ecfedce24213ecf2"
|
2014-09-04 01:29:10 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
#
|
|
|
|
# pyrax (for Rackspace support)
|
|
|
|
#
|
|
|
|
resource "Babel" do
|
|
|
|
url "https://pypi.python.org/packages/source/B/Babel/Babel-1.3.tar.gz"
|
|
|
|
sha256 "9f02d0357184de1f093c10012b52e7454a1008be6a5c185ab7a3307aceb1d12e"
|
2013-10-30 18:59:06 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resource "debtcollector" do
|
|
|
|
url "https://pypi.python.org/packages/source/d/debtcollector/debtcollector-0.5.0.tar.gz"
|
|
|
|
sha256 "4ddab1c494ce9c714a2b6f88a01bf1226a1b20d584bcf65d1593a2e4ca63b42a"
|
2013-10-30 18:59:06 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resource "iso8601" do
|
|
|
|
url "https://pypi.python.org/packages/source/i/iso8601/iso8601-0.1.10.tar.gz"
|
|
|
|
sha256 "e712ff3a18604833f5073e836aad795b21170b19bbef70947c441ed89d0ac0e1"
|
2013-10-30 18:59:06 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resource "keyring" do
|
|
|
|
url "https://pypi.python.org/packages/source/k/keyring/keyring-0.9.2.zip"
|
|
|
|
sha256 "3495c72ec6fdefd6da3a7271acac89903e6ffdfb984a71a3e087c49538351c30"
|
2013-10-30 18:59:06 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resource "mock" do
|
|
|
|
url "https://pypi.python.org/packages/source/m/mock/mock-1.0.1.tar.gz"
|
|
|
|
sha256 "b839dd2d9c117c701430c149956918a423a9863b48b09c90e30a6013e7d2f44f"
|
2014-11-18 07:32:45 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resource "msgpack-python" do
|
|
|
|
url "https://pypi.python.org/packages/source/m/msgpack-python/msgpack-python-0.4.6.tar.gz"
|
|
|
|
sha256 "bfcc581c9dbbf07cc2f951baf30c3249a57e20dcbd60f7e6ffc43ab3cc614794"
|
2013-10-30 18:59:06 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resource "netaddr" do
|
|
|
|
url "https://pypi.python.org/packages/source/n/netaddr/netaddr-0.7.14.tar.gz"
|
|
|
|
sha256 "02abbb54c9edd6a3046385d2634f51c1dbddbbc9b5816599ecd052b1d9ff445f"
|
2014-10-15 11:28:03 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resource "netifaces" do
|
|
|
|
url "https://pypi.python.org/packages/source/n/netifaces/netifaces-0.10.4.tar.gz"
|
|
|
|
sha256 "9656a169cb83da34d732b0eb72b39373d48774aee009a3d1272b7ea2ce109cde"
|
2014-10-15 11:28:03 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resource "os_diskconfig_python_novaclient_ext" do
|
|
|
|
url "https://pypi.python.org/packages/source/o/os_diskconfig_python_novaclient_ext/os_diskconfig_python_novaclient_ext-0.1.2.tar.gz"
|
|
|
|
sha256 "78076a7b05afb8842734329f306bd69e64af6af910a3bc973fcf023723b8d7fc"
|
2014-10-15 11:28:03 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resource "os_networksv2_python_novaclient_ext" do
|
|
|
|
url "https://pypi.python.org/packages/source/o/os_networksv2_python_novaclient_ext/os_networksv2_python_novaclient_ext-0.25.tar.gz"
|
|
|
|
sha256 "35ba71b027daf4c407d7a2fd94604d0437eea0c1de4d8d5d0f8ab69100834a0f"
|
2015-03-26 03:44:55 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resource "os_virtual_interfacesv2_python_novaclient_ext" do
|
|
|
|
url "https://pypi.python.org/packages/source/o/os_virtual_interfacesv2_python_novaclient_ext/os_virtual_interfacesv2_python_novaclient_ext-0.19.tar.gz"
|
|
|
|
sha256 "5171370e5cea447019cee5da22102b7eca4d4a7fb3f12875e2d7658d98462c0a"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "oslo.config" do
|
|
|
|
url "https://pypi.python.org/packages/source/o/oslo.config/oslo.config-1.12.0.tar.gz"
|
|
|
|
sha256 "80296f64f360d44033cbde2ad38239cf82ccc9ac4a74b30c68dad3357244ae99"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "oslo.i18n" do
|
|
|
|
url "https://pypi.python.org/packages/source/o/oslo.i18n/oslo.i18n-1.7.0.tar.gz"
|
|
|
|
sha256 "ca48f6ab8658fcc9ad9e2319a044a1bde16ee6d09f1b631a67d7f796e70b86ba"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "oslo.serialization" do
|
|
|
|
url "https://pypi.python.org/packages/source/o/oslo.serialization/oslo.serialization-1.6.0.tar.gz"
|
|
|
|
sha256 "e549ab5228f10dd13e6e1ea1f0dfe62af71de8d7df55665c37e2712ed7801595"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "oslo.utils" do
|
|
|
|
url "https://pypi.python.org/packages/source/o/oslo.utils/oslo.utils-1.6.0.tar.gz"
|
|
|
|
sha256 "a47fde81a18a6a2317ad9126e710d8a6cbdab55d4c6c0d11302304ff55b90fbf"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "pbr" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pbr/pbr-1.0.1.tar.gz"
|
|
|
|
sha256 "fc3d19ab844647388cc13a3df403bda872d2fc16662803d0ebcc1787d3645552"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "PrettyTable" do
|
|
|
|
url "https://pypi.python.org/packages/source/P/PrettyTable/prettytable-0.7.2.tar.bz2"
|
|
|
|
sha256 "853c116513625c738dc3ce1aee148b5b5757a86727e67eff6502c7ca59d43c36"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "pyrax" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pyrax/pyrax-1.9.3.tar.gz"
|
|
|
|
sha256 "0a3026c67df7bb84720cf562eef0fb15ad67dce79b6fc5e8da46621489be26bb"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "python-keystoneclient" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/python-keystoneclient/python-keystoneclient-1.6.0.tar.gz"
|
|
|
|
sha256 "45ac3b13b8b63ab62cb3fbfcaf46a2241d8053dfe17961db911c45c1f23d06ff"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "python-novaclient" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/python-novaclient/python-novaclient-2.26.0.tar.gz"
|
|
|
|
sha256 "725e28e981422e051352a76947dfab05838ee687f3c73a6524d64be8af8a900f"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "pytz" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pytz/pytz-2015.4.tar.bz2"
|
|
|
|
sha256 "a78b484d5472dd8c688f8b3eee18646a25c66ce45b2c26652850f6af9ce52b17"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "rackspace-auth-openstack" do
|
|
|
|
url "https://pypi.python.org/packages/source/r/rackspace-auth-openstack/rackspace-auth-openstack-1.3.tar.gz"
|
|
|
|
sha256 "c4c069eeb1924ea492c50144d8a4f5f1eb0ece945e0c0d60157cabcadff651cd"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "rackspace-novaclient" do
|
|
|
|
url "https://pypi.python.org/packages/source/r/rackspace-novaclient/rackspace-novaclient-1.4.tar.gz"
|
|
|
|
sha256 "68e1f53411b635f836a53d09e6c85f6a7d5d69d39df2e25a745406140cd5c275"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "rax_default_network_flags_python_novaclient_ext" do
|
|
|
|
url "https://pypi.python.org/packages/source/r/rax_default_network_flags_python_novaclient_ext/rax_default_network_flags_python_novaclient_ext-0.3.1.tar.gz"
|
|
|
|
sha256 "336d60bdb836dd4e51b142f7977da57b078ad2104a6628eaef7135c67a627c70"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "rax_scheduled_images_python_novaclient_ext" do
|
|
|
|
url "https://pypi.python.org/packages/source/r/rax_scheduled_images_python_novaclient_ext/rax_scheduled_images_python_novaclient_ext-0.3.1.tar.gz"
|
|
|
|
sha256 "f170cf97b20bdc8a1784cc0b85b70df5eb9b88c3230dab8e68e1863bf3937cdb"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "simplejson" do
|
|
|
|
url "https://pypi.python.org/packages/source/s/simplejson/simplejson-2.3.2.tar.gz"
|
|
|
|
sha256 "276c1837be470a21178f9e70b0688189e1a4e2d09ea85cef35078b929b605428"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "stevedore" do
|
|
|
|
url "https://pypi.python.org/packages/source/s/stevedore/stevedore-1.5.0.tar.gz"
|
|
|
|
sha256 "095d71a92518f3eec4c26e531e22fd4053caf3fc52ac6c0afa80a8a0e689da45"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "wrapt" do
|
|
|
|
url "https://pypi.python.org/packages/source/w/wrapt/wrapt-1.10.4.tar.gz"
|
|
|
|
sha256 "a657129f910f9155ea0a567ef442016bff6a0b4ace8a4c5e7fbf91e0eb13d7de"
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# python-keyczar (for Accelerated Mode support)
|
|
|
|
#
|
|
|
|
resource "pyasn1" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pyasn1/pyasn1-0.1.7.tar.gz"
|
|
|
|
sha256 "e4f81d53c533f6bd9526b047f047f7b101c24ab17339c1a7ad8f98b25c101eab"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "python-keyczar" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/python-keyczar/python-keyczar-0.715.tar.gz"
|
|
|
|
sha256 "f43f9f15b0b719de94cab2754dcf78ef63b40ee2a12cea296e7af788b28501bb"
|
2015-05-26 05:06:03 +00:00
|
|
|
end
|
|
|
|
|
2013-09-02 11:43:49 +00:00
|
|
|
def install
|
2014-11-07 06:25:23 +00:00
|
|
|
ENV["PYTHONPATH"] = libexec/"vendor/lib/python2.7/site-packages"
|
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
2013-09-02 11:43:49 +00:00
|
|
|
|
2015-06-08 15:11:15 +00:00
|
|
|
resources.each do |r|
|
|
|
|
r.stage do
|
2014-12-10 20:21:19 +00:00
|
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
|
|
end
|
2014-01-04 13:01:30 +00:00
|
|
|
end
|
|
|
|
|
2014-10-15 11:29:54 +00:00
|
|
|
inreplace "lib/ansible/constants.py" do |s|
|
2014-11-07 06:25:23 +00:00
|
|
|
s.gsub! "/usr/share/ansible", share/"ansible"
|
|
|
|
s.gsub! "/etc/ansible", etc/"ansible"
|
2013-09-03 09:13:20 +00:00
|
|
|
end
|
2013-09-02 11:43:49 +00:00
|
|
|
|
2014-12-10 20:21:19 +00:00
|
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
2014-05-01 16:08:37 +00:00
|
|
|
|
2014-10-15 11:29:54 +00:00
|
|
|
man1.install Dir["docs/man/man1/*.1"]
|
2014-11-07 06:25:23 +00:00
|
|
|
bin.install Dir["#{libexec}/bin/*"]
|
|
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
2013-09-02 11:43:49 +00:00
|
|
|
end
|
2013-10-18 23:51:59 +00:00
|
|
|
|
2014-01-04 13:01:30 +00:00
|
|
|
test do
|
2014-12-07 06:38:44 +00:00
|
|
|
ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp"
|
|
|
|
(testpath/"playbook.yml").write <<-EOF.undent
|
|
|
|
---
|
|
|
|
- hosts: all
|
|
|
|
gather_facts: False
|
|
|
|
tasks:
|
|
|
|
- name: ping
|
|
|
|
ping:
|
|
|
|
EOF
|
|
|
|
(testpath/"hosts.ini").write("localhost ansible_connection=local\n")
|
|
|
|
system bin/"ansible-playbook", testpath/"playbook.yml", "-i", testpath/"hosts.ini"
|
2013-10-18 23:51:59 +00:00
|
|
|
end
|
2013-09-02 11:43:49 +00:00
|
|
|
end
|