{"id":19882448,"url":"https://github.com/derjd/ansible-collection-general","last_synced_at":"2026-04-20T04:05:13.235Z","repository":{"id":78324701,"uuid":"326733945","full_name":"derJD/ansible-collection-general","owner":"derJD","description":"This ansible collection contains general plugins","archived":false,"fork":false,"pushed_at":"2021-01-31T11:50:59.000Z","size":23,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T18:19:27.757Z","etag":null,"topics":["ansible","ansible-collection"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derJD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-04T15:55:23.000Z","updated_at":"2023-03-25T16:43:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffcdca0d-26dd-4f24-8af4-695597a1a4f0","html_url":"https://github.com/derJD/ansible-collection-general","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-collection-general","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-collection-general/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-collection-general/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-collection-general/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derJD","download_url":"https://codeload.github.com/derJD/ansible-collection-general/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241310830,"owners_count":19942030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-collection"],"created_at":"2024-11-12T17:17:29.622Z","updated_at":"2025-10-06T16:05:41.862Z","avatar_url":"https://github.com/derJD.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Collection - derjd.general\n\n[![Galaxy](https://img.shields.io/static/v1??style=flat\u0026logo=ansible\u0026label=galaxy\u0026message=derJD.general\u0026color=blue)](https://galaxy.ansible.com/derJD/general)\n\nThis repo contains the `derjd.general` collection. You'll find several plugins in this collection\nthat aren't part of the [community.general collection](https://github.com/ansible-collections/community.general)\nand aren't part of more specialized collections as well.\n\n## Requirements\n\n* python \u003e= 3\n* python-requests\n* python-lxml\n* ansible \u003e= 2.9\n\n## Installation\n\nYou can use this collection simply by installing it with `ansible-galaxy`:\n\n```bash\nansible-galaxy collection install derjd.general\n```\n\nIf you are using requirement.yml files for downloading collections and roles, add these lines:\n\n```yaml\ncollections:\n  - derjd.general\n```\n\n## Usage\n\n### Filter\n\n#### dict2ini\n\nConverts nested, human readable, dicts into list of dicts,\nthat are easily parsable by ansible loops.\n\n```yaml\n---\n\n- hosts: localhost\n  gather_facts: false\n  vars:\n    ini_vars:\n      ima_1_section:\n        ima_1_option: ima_1_value\n        ima_2_option: ima_2_value\n      ima_2_section:\n        ima_3_option: ima_3_value\n        ima_4_option: ima_4_value\n\n  tasks:\n    - name: edit /tmp/test.ini file\n      ini_file:\n        path: /tmp/test.ini\n        section: \"{{ item.section }}\"\n        option: \"{{ item.option }}\"\n        value: \"{{ item.value }}\"\n      loop: \"{{ ini_vars | derjd.general.dict2ini }}\"\n```\n\n### Inventory\n\n#### http\n\nReads json inventories from any HTTP(s) source. The hosted inventory json file must comply with the [new inventory script convention](https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html#tuning-the-external-inventory-script), containing the top level `_meta` element with `hostvars` inside and all `groups` with `children` and `hosts`.\nThis inventory plugin should be detected by ansible's `auto inventory plugin` as soon as an inventory is specified that ends on `http_inventory.yml` or `http_inventory.yaml`.\n\n**Example**:\n\nInventory hosted on a plain webserver without authentication.\n\n`web.http_inventory.yml`:\n\n```yaml\nplugin: derjd.general.http\nurl: https://example.io/example_inventories/dev/inventory.json\n```\n\n```bash\nansible-inventory -i web.http_inventory.yml --graph\n@all:\n  |--@devstack:\n  |  |--@api:\n  |  |  |--api01ve.devstack\n  [...]\n```\n\nInventory hosted on gitlab pages and authentication enabled.\n\n`gitlab_pages.http_inventory.yml`:\n\n```yaml\nplugin: derjd.general.http\nurl: https://example.gitlab.io/example_inventories/dev/inventory.json\nauth_method: gitlab\n```\n\n```bash\nexport HTTP_USERNAME=example_USERNAME\nexport HTTP_PASSWORD=example_PASSWORD\n\nansible-inventory -i gitlab_pages.http_inventory.yml --graph\n@all:\n  |--@devstack:\n  |  |--@api:\n  |  |  |--api01ve.devstack\n  [...]\n```\n\n## License\n\n* Code released under [GNU General Public License v3.0 or later](https://www.gnu.org/licenses/gpl-3.0.txt)\n\n## Author\n\n* [derJD](https://github.com/derJD/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderjd%2Fansible-collection-general","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderjd%2Fansible-collection-general","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderjd%2Fansible-collection-general/lists"}