{"id":22499767,"url":"https://github.com/avinash6784/ansible-dynamic-inventory-mysql","last_synced_at":"2025-08-03T06:32:27.038Z","repository":{"id":217116333,"uuid":"117085475","full_name":"avinash6784/ansible-dynamic-inventory-mysql","owner":"avinash6784","description":"Ansible dynamic inventory for MySQL with Python Script","archived":false,"fork":false,"pushed_at":"2018-01-11T11:37:04.000Z","size":7,"stargazers_count":7,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-14T17:27:50.856Z","etag":null,"topics":["ansible","ansible-inventory","dynamic-inventory","mariadb","mysql","pyhton"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avinash6784.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-01-11T10:28:56.000Z","updated_at":"2024-01-14T17:27:52.395Z","dependencies_parsed_at":"2024-01-14T17:27:52.291Z","dependency_job_id":"8cd3ac53-c869-47db-b43c-58d711ec5e50","html_url":"https://github.com/avinash6784/ansible-dynamic-inventory-mysql","commit_stats":null,"previous_names":["avinash6784/ansible-dynamic-inventory-mysql"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avinash6784%2Fansible-dynamic-inventory-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avinash6784%2Fansible-dynamic-inventory-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avinash6784%2Fansible-dynamic-inventory-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avinash6784%2Fansible-dynamic-inventory-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avinash6784","download_url":"https://codeload.github.com/avinash6784/ansible-dynamic-inventory-mysql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228532229,"owners_count":17933247,"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-inventory","dynamic-inventory","mariadb","mysql","pyhton"],"created_at":"2024-12-06T22:15:46.663Z","updated_at":"2024-12-06T22:15:47.444Z","avatar_url":"https://github.com/avinash6784.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Ansible dynamic inventory for MySQL with Python Script - ansible-dynamic-inventory-mysql\nAnsible dynamic inventory for MySQL with Python Script. Here I have created test dynamic inventory script with python to get data from MySQL and Ansible will use it as an inventory source as long as it returns a JSON structure with the --list option.\n\n## Usage\nSimply call the script like the following\n\n```yml\nansible-playbook -i dynamic_inventory.py example_playbook.yml\n# or\nansible -i dynamic_inventory.py group_name -m ping\n```\nPython script run and its sample json output\n```shell\n./dynamic_inventory.py --list\n\noutput ---\n{\n\t\"all\": [\"localdb\", \"local\", \"localhost\"],\n\t\"REDHAT\": [\"local\", \"localhost\"],\n\t\"WINDOWS\": [\"localdb\"],\n\t\"app\": [\"localhost\"],\n\t\"db\": [\"localdb\", \"local\", \"localhost\"]\n}\n```\n## Author Informations\n\nThis python script was created by [Avinash Pawar](http://devopstechie.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favinash6784%2Fansible-dynamic-inventory-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favinash6784%2Fansible-dynamic-inventory-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favinash6784%2Fansible-dynamic-inventory-mysql/lists"}