{ "info": { "author": "Peter Burns", "author_email": "pcburns@outlook.com", "bugtrack_url": null, "classifiers": [], "description": "==========\nAggravator\n==========\n\n.. image:: https://travis-ci.org/petercb/aggravator.svg?branch=master\n :target: https://travis-ci.org/petercb/aggravator\n\n.. image:: https://coveralls.io/repos/github/petercb/aggravator/badge.svg?branch=master\n :target: https://coveralls.io/github/petercb/aggravator?branch=master\n\nDynamic inventory script for Ansible that aggregates information from other sources\n\nInstalling\n----------\n\n.. code:: sh\n\n virtualenv aggravator\n source aggravator/bin/activate\n pip install aggravator\n\n\nExecuting\n---------\n\n.. code:: sh\n\n ansible-playbook -i aggravator/bin/inventory site.yml\n\n\nHow does it work\n----------------\n\nIt will aggregate other config sources (YAML or JSON format) into a single\nconfig stream.\n\nThe sources can be files or urls (to either file or webservices that produce\nYAML or JSON) and the key path to merge them under can be specified.\n\nWhy does it exist\n-----------------\n\nWe wanted to maintain our Ansible inventory in GIT as YAML files, and not in\nthe INI like format that Ansible generally supports for flat file inventory.\n\nAdditionally we had some legacy config management systems that contained some\ninformation about our systems that we wanted exported to Ansible so we didn't\nhave to maintain them in multiple places.\n\nSo a script that could take YAML files and render them in a JSON format that\nAnsible would ingest was needed, as was one that could aggregate many files\nand streams.\n\nConfig format\n-------------\n\nExample (etc/config.yaml):\n\n.. code:: yaml\n\n ---\n environments:\n test:\n include:\n - path: inventory/test.yaml\n - path: vars/global.yaml\n key: all/vars\n - path: secrets/test.yaml\n key: all/vars\n\nBy default the inventory script will look for the root config file as follows:\n\n- `../etc/config.yaml` (relative to the `inventory` file)\n- `/etc/aggravator/config.yaml`\n- `/usr/local/etc/aggravator/config.yaml`\n\nIf it can't find it in one of those locations, you will need to use the `--uri`\noption to specify it (or set the `INVENTORY_URI` env var)\n\nIt will parse it for a list of environments (test, prod, qa, etc) and for a\nlist of includes. The `include` section should be a list of dictionaries with\nthe following keys:\n\npath\n The path to the data to be ingested, this can be one of:\n - absolute file path\n - relative file path (relative to the root config.yaml)\n - url to a file or service that emits a supported format\n\nkey\n The key where the data should be merged into, if none is specified it is\n imported into the root of the data structure.\n\nformat\n The data type of the stream to ingest (ie. `yaml` or `json`) if not specified\n then the script will attempt to guess it from the file extension\n\n*Order* is important as items lower in the list will take precedence over ones\nspecified earlier in the list.\n\nMerging\n-------\n\nDictionaries will be merged, and lists will be replaced. So if a property at\nthe same level in two source streams of the same name are dictionaries their\ncontents will be merged. If they are lists, the later one will replace the\nearlier.\n\nIf the data type of two properties at the same level are different the later\none will overwrite the earlier.\n\nEnvironment Variables\n---------------------\n\nSetting the following environment variables can influence how the script\nexecutes when it is called by Ansible.\n\n`INVENTORY_ENV`\n Specify the environment name to merge inventory for as defined under the\n 'environments' section in the root config.\n The environment name can also be guessed from the executable name, so if you\n create a symlink from `prod` to the `inventory` bin, it will assume the env\n you want to execute for is called `prod`, unless you override that.\n\n`INVENTORY_FORMAT`\n Format to output in, defaults to YAML in >0.4\n Previously only output in JSON\n\n`INVENTORY_URI`\n Location to the root config, if not in one of the standard locations\n\n`VAULT_PASSWORD_FILE`\n Location of the vault password file if not in the default location of\n `~/.vault_pass.txt`, can be set to `/dev/null` to disable decryption of\n secrets.\n\n\nUsage\n-----\n\n`inventory [OPTIONS]`\n\n Ansible file based dynamic inventory script\n\nOptions:\n\n--env TEXT specify the platform name to pull inventory for\n--uri TEXT specify the URI to query for inventory config\n file, supports file:// and http(s):// [default:\n /home/peterb-l/git/petercb/aggravator/venv/etc/config.yaml]\n--output-format [yaml|json] specify the output format [default: yaml]\n--vault-password-file PATH vault password file, if set to /dev/null secret\n decryption will be disabled [default: ~/.vault_pass.txt]\n--list Print inventory information as a JSON object\n--host TEXT Retrieve host variables (not implemented)\n--createlinks DIRECTORY Create symlinks in DIRECTORY to the script for\n each platform name retrieved\n--show Output a list of upstream environments (or groups if environment was set)\n--help Show this message and exit.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/petercb/aggravator", "keywords": "ansible", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "aggravator", "package_url": "https://pypi.org/project/aggravator/", "platform": "", "project_url": "https://pypi.org/project/aggravator/", "project_urls": { "Homepage": "https://github.com/petercb/aggravator" }, "release_url": "https://pypi.org/project/aggravator/0.4.4/", "requires_dist": null, "requires_python": "", "summary": "Ansible inventory script to aggregate other inventory sources", "version": "0.4.4" }, "last_serial": 4942221, "releases": { "0.3.2": [ { "comment_text": "", "digests": { "md5": "bba28ae97f47edbcc13ec5fc6ac04879", "sha256": "d1f6dcebd4fd929d09a9151c61c55e58909b7ea9fa3a71588eda054013a3a2c5" }, "downloads": -1, "filename": "aggravator-0.3.2.tar.gz", "has_sig": false, "md5_digest": "bba28ae97f47edbcc13ec5fc6ac04879", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7272, "upload_time": "2018-01-17T14:58:22", "url": "https://files.pythonhosted.org/packages/91/ad/d340df0fcf891108bd1d308097e953446f54b73bc97e9da50bd75da476e1/aggravator-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "0682ad8bde23d5f7dc7b02bb614bb6f4", "sha256": "d28f7f8fc117bea1e2787e7286d17a51c457dae09674a88e738c75b2d6c4202d" }, "downloads": -1, "filename": "aggravator-0.3.3.tar.gz", "has_sig": false, "md5_digest": "0682ad8bde23d5f7dc7b02bb614bb6f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7177, "upload_time": "2018-01-17T18:21:02", "url": "https://files.pythonhosted.org/packages/33/02/cf0dbb9ac7942764f6b252a66649d4a06ca36b516a4eb38c1cbdd79f480a/aggravator-0.3.3.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "9a5f70402057e6adcfae4cf564c849dc", "sha256": "e39abebc8a865378734f685fe0edab1d562e4e6463c73f841fd0e0d026cde4d7" }, "downloads": -1, "filename": "aggravator-0.4.0.tar.gz", "has_sig": false, "md5_digest": "9a5f70402057e6adcfae4cf564c849dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7240, "upload_time": "2018-03-26T15:11:51", "url": "https://files.pythonhosted.org/packages/57/a5/85a2cf734d86647bf12472d7564b24fdca4dd7c886fbc795678cce9ae72c/aggravator-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "92a3df7090f8095cd52f8927f31a8c09", "sha256": "ef7bebbe2f71a03be3332adfbca229eb20bfea08db646d3ce2d61a762d413d45" }, "downloads": -1, "filename": "aggravator-0.4.1.tar.gz", "has_sig": false, "md5_digest": "92a3df7090f8095cd52f8927f31a8c09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7368, "upload_time": "2018-04-18T18:17:45", "url": "https://files.pythonhosted.org/packages/cc/6f/a9f9374c2264d406937d7b9c028d0bb84ccb87dde0bce7180f1678ac3f98/aggravator-0.4.1.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "6d5ee6540e13353228e079b4ecddbc99", "sha256": "cec6d8e03167f63da646c63941c0bfbf1908b8dc93c673ca70b16679c379db19" }, "downloads": -1, "filename": "aggravator-0.4.3.tar.gz", "has_sig": false, "md5_digest": "6d5ee6540e13353228e079b4ecddbc99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7427, "upload_time": "2018-08-30T15:07:40", "url": "https://files.pythonhosted.org/packages/b8/ca/f7c454aab77987fb1d67f83dc7cafc6f792809f23a20007d1d2d9dcdb7db/aggravator-0.4.3.tar.gz" } ], "0.4.4": [ { "comment_text": "", "digests": { "md5": "4102fb66f48583f79a102bddba7162ac", "sha256": "84e7a4e71fa7a2dceb0a8d9d1c748705b2815534157b9d8ced83db67cd6c9216" }, "downloads": -1, "filename": "aggravator-0.4.4.tar.gz", "has_sig": false, "md5_digest": "4102fb66f48583f79a102bddba7162ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7628, "upload_time": "2019-03-15T01:00:46", "url": "https://files.pythonhosted.org/packages/35/4d/f0e38a3e7becce9037ac66dc58d9709fe000814a762b30e5a7d7a0575870/aggravator-0.4.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4102fb66f48583f79a102bddba7162ac", "sha256": "84e7a4e71fa7a2dceb0a8d9d1c748705b2815534157b9d8ced83db67cd6c9216" }, "downloads": -1, "filename": "aggravator-0.4.4.tar.gz", "has_sig": false, "md5_digest": "4102fb66f48583f79a102bddba7162ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7628, "upload_time": "2019-03-15T01:00:46", "url": "https://files.pythonhosted.org/packages/35/4d/f0e38a3e7becce9037ac66dc58d9709fe000814a762b30e5a7d7a0575870/aggravator-0.4.4.tar.gz" } ] }