{"id":28519956,"url":"https://github.com/ansible-community/role2collection","last_synced_at":"2025-07-12T16:34:22.189Z","repository":{"id":66212173,"uuid":"344861686","full_name":"ansible-community/role2collection","owner":"ansible-community","description":"Tooling to assist in migrating to collections","archived":false,"fork":false,"pushed_at":"2022-02-23T13:41:49.000Z","size":48,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-07-05T13:33:54.919Z","etag":null,"topics":["ansible-devtools"],"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/ansible-community.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,"zenodo":null}},"created_at":"2021-03-05T16:02:10.000Z","updated_at":"2024-05-30T16:27:45.000Z","dependencies_parsed_at":"2023-02-21T23:15:25.597Z","dependency_job_id":null,"html_url":"https://github.com/ansible-community/role2collection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ansible-community/role2collection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-community%2Frole2collection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-community%2Frole2collection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-community%2Frole2collection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-community%2Frole2collection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansible-community","download_url":"https://codeload.github.com/ansible-community/role2collection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-community%2Frole2collection/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265024189,"owners_count":23699587,"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-devtools"],"created_at":"2025-06-09T06:31:14.797Z","updated_at":"2025-07-12T16:34:22.184Z","avatar_url":"https://github.com/ansible-community.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# role2collection\nTooling to assist in migrating to collections\n\nThese tools may cover many common cases, but do not aim to address all cases.\n\nAfter using these tools, users should manually verify the changes, and may be required to make further changes to produce functional content.\n\n## role2collection\n\n\u003e **_NOTE:_**  This script requires Python 3.8 or newer\n\n### Help\n\n```\nusage: role2collection.py [-h] [--extra-path EXTRA_PATH] ROLE_PATH COLLECTION_PATH\n\npositional arguments:\n  ROLE_PATH             Path to a role to migrate\n  COLLECTION_PATH       Path to collection where role should be migrated\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --extra-path EXTRA_PATH\n                        Extra role relative file/directory path to keep with the role. May be supplied multiple\n                        times\n```\n\n### Example use\n\n```\n$ python3.8 role2collection.py --extra-path CONTRIBUTING.md roles/role.name collections/ansible_collections/ns/name\n```\n\n### What this tool does\n\n1. Migrates standard role directories and a few files into a role within a collection:\n    * `defaults`\n    * `files`\n    * `handlers`\n    * `meta`\n    * `tasks`\n    * `templates`\n    * `tests`\n    * `vars`\n    * `README.md` / `README`\n    * `LICENSE.txt` / `LICENSE`\n    * For any other file or directory you wish to keep with a role use `--extra-path`\n1. Migrates plugins from the role into the collection level plugin directories\n1. Rewrites `module_utils` imports in `modules` and `module_utils` to support the migration\n1. Migrates all other directories or files into the root of the collection\n\n### Notes\n\n1. Does not perform `doc_fragments` rewrites\n1. Does not do anything with the `tests` directory, other than keep them with the role\n1. Does not modify anything in role YAML files\n1. Overwrites duplicate files\n1. Does not come with any warranties\n1. Does not special case any 3rd party tool directory or files, use `--extra-path` to support this\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansible-community%2Frole2collection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansible-community%2Frole2collection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansible-community%2Frole2collection/lists"}