{ "info": { "author": "Ahmed AbouZaid", "author_email": "ahmed.m@aabouzaid.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Topic :: System :: Installation/Setup", "Topic :: System :: Systems Administration", "Topic :: Utilities" ], "description": "Netbox dynamic inventory script\n===============================\n\n|PyPI Version| |Python Version| |Build Status| |Codacy Badge| |Code Health| |Coverage Status|\n\nToC\n---\n\n- `Intro <#intro>`__\n- `Compatibility <#compatibility>`__\n- `Grouping <#grouping>`__\n- `Hosts variables <#hosts-variables>`__\n- `Options <#options>`__\n- `Usage <#usage>`__\n\n\nIntro\n-----\n\nThis is a Netbox dynamic inventory script for Ansible.\n`Netbox `__ is an IP address\nmanagement (IPAM) and data center infrastructure management (DCIM) tool.\nIt's nice, modern, and has good APIs ... so it's a pretty nice option to\nserve as a \"Source of Truth\".\n\nYou can group servers as you want and based on what you have in Netbox,\nyou can select fields as groups or as vars for hosts. And you can use\ndefault fields or custom fields.\n\n\nCompatibility\n-------------\n\nThe script tested with ``netbox = v1.6`` and ``netbox = v2.0.4``,\nbut most probably it will work with all netbox v1.0 and above.\n\n\nGrouping\n--------\n\nServers could be grouped by any section in Netbox.\ne.g. you can group hosts by \"site, \"rack\", \"role\", \"platform\",\nor any other section in Netbox.\n**Please remember**: For grouping, API names should be used not UI names.\n\nSo if you have a \"site\" called \"US-East\", in Ansible you will get a\nhosts group is called \"US-East\" has all hosts in that site.\n\nIf that section is a `default` section you need to put it under\n``group_by.default`` if it's a custom section (custom fields), then\nput it under ``group_by.custom``.\n\nHere is an example how servers will be grouped based on their ``platform``.\n\n::\n\n group_by:\n default:\n - platform\n\nSo if you have \"Ubuntu\" and \"CentOS\" as platforms in Netbox,\nyou will have 2 groups of servers that using that systems.\n\n\nHosts variables\n---------------\n\nNetbox sections could be used as variables for hosts! e.g. you could use\nthe IP of the host in Netbox as ``ansible_ssh_host``, or use a custom\nfield as well.\n\nThere are 3 sections here, first type is ``IP``, second one is\n``General``, and finally ``Custom``.\n\nVariables are defined as ``Key: Value``. The key is what will be in\nAnsible and value comes from Netbox.\n\n::\n\n hosts_vars:\n ip:\n ansible_ssh_host: primary_ip\n\nHere ``primary_ip`` will be used as value for ``ansible_ssh_host``.\n\n\nOptions\n-------\n\n::\n\n $ netbox.py -h\n usage: netbox.py [-h] [-c CONFIG_FILE] [--list] [--host HOST]\n\n optional arguments:\n -h, --help show this help message and exit\n -c CONFIG_FILE, --config-file CONFIG_FILE\n Path for script's configuration. Also\n \"NETBOX_CONFIG_FILE\" could be used as env var to set\n conf file path. (default: netbox.yml)\n\n --list Print all hosts with vars as Ansible dynamic inventory\n syntax. (default: False)\n --host HOST Print specific host vars as Ansible dynamic inventory\n syntax. (default: None)\n\nYou can also set config file path through environment variable ``NETBOX_CONFIG_FILE``.\n\n\nUsage\n-----\n\n::\n\n $ ansible all -i netbox.py -m ping\n\n\n.. |Python Version| image:: https://img.shields.io/pypi/pyversions/ansible-netbox-inventory.svg\n :target: https://pypi.python.org/pypi/ansible-netbox-inventory\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/ansible-netbox-inventory.svg\n :target: https://pypi.python.org/pypi/ansible-netbox-inventory\n.. |Build Status| image:: https://travis-ci.org/AAbouZaid/netbox-as-ansible-inventory.svg?branch=master\n :target: https://travis-ci.org/AAbouZaid/netbox-as-ansible-inventory\n.. |Codacy Badge| image:: https://img.shields.io/codacy/8deda33a029a45a8bc360df4dcbf8660.svg\n :target: https://www.codacy.com/app/AAbouZaid/netbox-as-ansible-inventory\n.. |Code Health| image:: https://landscape.io/github/AAbouZaid/netbox-as-ansible-inventory/master/landscape.svg?style=flat\n :target: https://landscape.io/github/AAbouZaid/netbox-as-ansible-inventory/master\n.. |Coverage Status| image:: https://coveralls.io/repos/github/AAbouZaid/netbox-as-ansible-inventory/badge.svg\n :target: https://coveralls.io/github/AAbouZaid/netbox-as-ansible-inventory", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/AAbouZaid/netbox-as-ansible-inventory", "keywords": "ansible", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "ansible-netbox-inventory", "package_url": "https://pypi.org/project/ansible-netbox-inventory/", "platform": "", "project_url": "https://pypi.org/project/ansible-netbox-inventory/", "project_urls": { "Homepage": "https://github.com/AAbouZaid/netbox-as-ansible-inventory" }, "release_url": "https://pypi.org/project/ansible-netbox-inventory/1.0.9/", "requires_dist": null, "requires_python": "", "summary": "Ansible dynamic inventory script for Netbox", "version": "1.0.9" }, "last_serial": 3603566, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "68c1715980fff0cace1f9c2bc097e966", "sha256": "b305ef594b39e4a0b264459d0419f9f9b20ba3c483386dd8a6dd82c2076030b8" }, "downloads": -1, "filename": "ansible-netbox-inventory-1.0.1.tar.gz", "has_sig": false, "md5_digest": "68c1715980fff0cace1f9c2bc097e966", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11098, "upload_time": "2017-05-06T17:08:57", "url": "https://files.pythonhosted.org/packages/f6/db/f49ee07e07cdde5696c95f514ad3d52b407bae5240941133fc34f057374f/ansible-netbox-inventory-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "e4777bec68634ff6794031f2d68413f7", "sha256": "cb6da1cb14e53a2583c05e1acc96988cac70d34f7b22c60c7fe3d8bfdf09bace" }, "downloads": -1, "filename": "ansible-netbox-inventory-1.0.2.tar.gz", "has_sig": false, "md5_digest": "e4777bec68634ff6794031f2d68413f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11399, "upload_time": "2017-05-08T20:53:31", "url": "https://files.pythonhosted.org/packages/c7/1b/b94ee8b7a3aea021e2d5af65ad070495b16bfda890c341320f75b443bf6c/ansible-netbox-inventory-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "cbedc5945acc84f039d0218689256370", "sha256": "104c8181461ac73f808e523742e33c61231e28f7a9afb8e94592daa6ec9ef39f" }, "downloads": -1, "filename": "ansible-netbox-inventory-1.0.3.tar.gz", "has_sig": false, "md5_digest": "cbedc5945acc84f039d0218689256370", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11546, "upload_time": "2017-06-01T00:17:57", "url": "https://files.pythonhosted.org/packages/e2/74/cc00d5dc8a6cf4a186c854adcedabf8b6eef1dc1e6379cd1d7a92a9d0148/ansible-netbox-inventory-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "6335cbfc15ce258f4a5b9e444418ac95", "sha256": "e84a90c281620a8252cee5c1098c0db9b4f40c1986e6f722e268e956904c17b0" }, "downloads": -1, "filename": "ansible-netbox-inventory-1.0.4.tar.gz", "has_sig": false, "md5_digest": "6335cbfc15ce258f4a5b9e444418ac95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11541, "upload_time": "2017-09-17T21:26:08", "url": "https://files.pythonhosted.org/packages/d2/84/c5dac68cc4e155d085c8a85078e50f1dac0f49bdc38516582168aa6ab43e/ansible-netbox-inventory-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "afe6eae8e549ab035a9eb763bb9171ee", "sha256": "a9d4370f48ba9ef87549616e9dee6c8441f76f978792fca5902300f8647a8aa0" }, "downloads": -1, "filename": "ansible-netbox-inventory-1.0.5.tar.gz", "has_sig": false, "md5_digest": "afe6eae8e549ab035a9eb763bb9171ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22710, "upload_time": "2017-09-23T01:13:45", "url": "https://files.pythonhosted.org/packages/5c/fa/46c85d4b7a81f9e7ad68c4127d61d2d69178f8853330200eccf9aec9df8e/ansible-netbox-inventory-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "9b1c1e9ee06be251d3dc4a35a4597a29", "sha256": "7b2d4808f3b8a51349fe2db7ed4292f0859a4c813f8c390e97b7a79fc5f17e13" }, "downloads": -1, "filename": "ansible-netbox-inventory-1.0.6.tar.gz", "has_sig": false, "md5_digest": "9b1c1e9ee06be251d3dc4a35a4597a29", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23282, "upload_time": "2017-10-08T01:26:01", "url": "https://files.pythonhosted.org/packages/65/8e/674a848ea726fb271877975b85c9ad172f46ef4ab49cded82dda8e884282/ansible-netbox-inventory-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "70773b414e4c95aa2d1d57c6870de496", "sha256": "58b43d0da38e2c8be9c594c2c68afdfbc68a29dbd9ab167b04dbd2125c0a2647" }, "downloads": -1, "filename": "ansible-netbox-inventory-1.0.7.tar.gz", "has_sig": false, "md5_digest": "70773b414e4c95aa2d1d57c6870de496", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23742, "upload_time": "2017-10-21T09:38:17", "url": "https://files.pythonhosted.org/packages/e7/b3/f7cae4299a59ff7069f848fddc93970d8ff37acda2bb0913a2dd2c7c8182/ansible-netbox-inventory-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "005878ec5ff35399ef2993f26821a2a7", "sha256": "2160e71125274673828bb87453f295e3374186b574ab5ebf70d9da75b28da117" }, "downloads": -1, "filename": "ansible-netbox-inventory-1.0.8.tar.gz", "has_sig": false, "md5_digest": "005878ec5ff35399ef2993f26821a2a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23435, "upload_time": "2017-10-30T23:39:18", "url": "https://files.pythonhosted.org/packages/3d/ed/2d984b37ba2942a74b63eb34d265b93190da9c8088b29ce6eabeedfe28cd/ansible-netbox-inventory-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "c85451f434125ee9c705b51fbce91ad6", "sha256": "c87fec954783abf6fa47c04666238ec2a6de898b998cacf560883f5aff7db267" }, "downloads": -1, "filename": "ansible-netbox-inventory-1.0.9.tar.gz", "has_sig": false, "md5_digest": "c85451f434125ee9c705b51fbce91ad6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27779, "upload_time": "2018-02-21T22:15:54", "url": "https://files.pythonhosted.org/packages/b3/04/3e83f3c64e46a93ce415950db5a67565dd6298bcac42c6a1bb91dd3d1e0b/ansible-netbox-inventory-1.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c85451f434125ee9c705b51fbce91ad6", "sha256": "c87fec954783abf6fa47c04666238ec2a6de898b998cacf560883f5aff7db267" }, "downloads": -1, "filename": "ansible-netbox-inventory-1.0.9.tar.gz", "has_sig": false, "md5_digest": "c85451f434125ee9c705b51fbce91ad6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27779, "upload_time": "2018-02-21T22:15:54", "url": "https://files.pythonhosted.org/packages/b3/04/3e83f3c64e46a93ce415950db5a67565dd6298bcac42c6a1bb91dd3d1e0b/ansible-netbox-inventory-1.0.9.tar.gz" } ] }