{"id":18367809,"url":"https://github.com/gantsign/molecule-wrapper","last_synced_at":"2025-08-20T12:04:20.595Z","repository":{"id":36436945,"uuid":"146595871","full_name":"gantsign/molecule-wrapper","owner":"gantsign","description":"A wrapper script to make running Molecule easier","archived":false,"fork":false,"pushed_at":"2022-04-30T23:50:16.000Z","size":126,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-22T03:51:13.793Z","etag":null,"topics":["ansible","molecule"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gantsign.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}},"created_at":"2018-08-29T12:22:35.000Z","updated_at":"2024-11-22T19:28:11.000Z","dependencies_parsed_at":"2022-08-08T14:31:58.687Z","dependency_job_id":null,"html_url":"https://github.com/gantsign/molecule-wrapper","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantsign%2Fmolecule-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantsign%2Fmolecule-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantsign%2Fmolecule-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantsign%2Fmolecule-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gantsign","download_url":"https://codeload.github.com/gantsign/molecule-wrapper/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247522289,"owners_count":20952518,"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","molecule"],"created_at":"2024-11-05T23:23:31.265Z","updated_at":"2025-04-06T17:31:33.042Z","avatar_url":"https://github.com/gantsign.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Molecule Wrapper\n\n[![Lint](https://github.com/gantsign/molecule-wrapper/actions/workflows/ci.yml/badge.svg)](https://github.com/gantsign/molecule-wrapper/actions/workflows/ci.yml)\n\nA wrapper script (in the spirit of the\n[Grade Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html))\nto make installing/running\n[Molecule](https://molecule.readthedocs.io/en/latest/configuration.html) easier.\n\nNote: this script currently only works on Linux.\n\n## Installation\n\nIn the root of your Ansible role run the following to install the wrapper:\n\n```bash\nwget 'https://raw.githubusercontent.com/gantsign/molecule-wrapper/master/moleculew' -O moleculew \\\n    \u0026\u0026 chmod 'u+x' moleculew\n```\n\n### Tab completion and alias for Zsh\n\nTo enable tab-completion support and add an alias so you can run the wrapper\nusing `molecule` follow [these instructions](zsh/README.md).\n\n## Caution\n\nMolecule has a lot of dependencies, some of which you'll need root privileges to\ninstall.\n\nWhen you run the molecule wrapper for the first time it will attempt to install\nthe following:\n\n* [Python build dependencies](https://github.com/pyenv/pyenv/wiki/common-build-problems)\n* [Python](https://www.python.org/)\n* [Docker](https://www.docker.com) (if not already installed)\n* [Git](https://git-scm.com)\n* [curl](https://curl.haxx.se)\n* [jq](https://stedolan.github.io/jq/)\n* [pyenv](https://github.com/pyenv/pyenv) (if not already installed)\n* [virtualenv](https://virtualenv.pypa.io/en/stable)\n* [Ansible](https://www.ansible.com) (inside the virtual environment)\n* [Molecule](https://molecule.readthedocs.io) (inside the virtual environment)\n\nIf you don't have root privileges see\n[using system dependencies](#using-system-dependencies).\n\n## Usage\n\nYou can run any Molecule command directly using the wrapper e.g.:\n\n```\n./moleculew test\n```\n\nBy default Molecule Wrapper runs using the latest versions of Python,\nAnsible, Molecule, YamlLint, Ansible Lint, Flake8 and Testinfra.\n\nYou can also specify particular versions by passing command line arguments or\nsetting environment variables:\n\n```\nAdditional options:\n  --ansible VERSION          Use the specified version of Ansible\n  --molecule VERSION         Use the specified version of Molecule\n  --python VERSION           Use the specified version of Python\n  --yamllint VERSION         Use the specified version of YamlLint\n  --ansible-lint VERSION     Use the specified version of Ansible Lint\n  --flake8 VERSION           Use the specified version of Flake8\n  --testinfra VERSION        Use the specified version of Testinfra\n  --use-system-dependencies  Use system dependencies\n\nEnvironment variables:\n  MOLECULEW_ANSIBLE       Use the specified version of Ansible\n  MOLECULEW_MOLECULE      Use the specified version of Molecule\n  MOLECULEW_PYTHON        Use the specified version of Python\n  MOLECULEW_YAMLLINT      Use the specified version of YamlLint\n  MOLECULEW_ANSIBLE_LINT  Use the specified version of Ansible Lint\n  MOLECULEW_FLAKE8        Use the specified version of Flake8\n  MOLECULEW_TESTINFA      Use the specified version of Testinfra\n  MOLECULEW_USE_SYSTEM    Use system dependencies (true/false)\n```\n\nThe version may be a valid version number, `latest` to use the latest\navailable version, or `default` to use the frozen version (if set) or otherwise\nuse the latest version (i.e. the same effect as not specifying the option).\n\nThe above command line arguments take preference over environment variables.\n\ne.g.\n\n```\n./moleculew --python 3.6.6 test\n```\n\n### Freezing versions\n\nYou can freeze the dependency versions by running the following command:\n\n```\n./moleculew wrapper-freeze\n```\n\nYou can also specify versions when freezing the dependencies:\n\n```\n./moleculew --python 3.6.6 wrapper-freeze\n```\n\nNote: any version you specify as a command line argument when running Molecule\nwill override the frozen version of that dependency.\n\n### Using system dependencies\n\nIf you don't have root privileges but you already have the necessary\ndependencies installed you can uses those dependencies by specifying\n`--use-system-dependencies`:\n\ne.g.\n\n```\n./moleculew --use-system-dependencies test\n```\n\nRequired dependencies:\n* [Python build dependencies](https://github.com/pyenv/pyenv/wiki/common-build-problems) (to build Molecule and its dependencies)\n* [Python](https://www.python.org/) including [pip](https://pypi.org/project/pip/)\n* [Docker](https://www.docker.com)\n* [Git](https://git-scm.com)\n* [curl](https://curl.haxx.se)\n* [jq](https://stedolan.github.io/jq/)\n\nThe remaining dependencies don't require root privileges and will be installed\nif necessary.\n\nThis can also be useful for CI builds where you want to save time by using\nexisting binaries.\n\n## Command line reference\n\n### wrapper-versions\n\nDisplays the current dependency versions being used:\n\n```\nOptions:\n  --ansible VERSION          Use the specified version of Ansible\n  --molecule VERSION         Use the specified version of Molecule\n  --python VERSION           Use the specified version of Python\n  --yamllint VERSION         Use the specified version of YamlLint\n  --ansible-lint VERSION     Use the specified version of Ansible Lint\n  --flake8 VERSION           Use the specified version of Flake8\n  --testinfra VERSION        Use the specified version of Testinfra\n  --use-system-dependencies  Use the system version of Python\n\nEnvironment variables:\n  MOLECULEW_ANSIBLE       Use the specified version of Ansible\n  MOLECULEW_MOLECULE      Use the specified version of Molecule\n  MOLECULEW_PYTHON        Use the specified version of Python\n  MOLECULEW_YAMLLINT      Use the specified version of YamlLint\n  MOLECULEW_ANSIBLE_LINT  Use the specified version of Ansible Lint\n  MOLECULEW_FLAKE8        Use the specified version of Flake8\n  MOLECULEW_TESTINFA      Use the specified version of Testinfra\n  MOLECULEW_USE_SYSTEM    Use system dependencies (true/false)\n```\n\nThe version may be a valid version number, `latest` to use the latest\navailable version, or `default` to use the frozen version (if set) or otherwise\ndisplay the latest version (i.e. the same effect as not specifying the option).\n\nThe above command line arguments take preference over environment variables.\n\ne.g.\n\n```bash\n./moleculew wrapper-versions\n```\n\n### wrapper-freeze\n\nFreezes the dependency versions being used:\n\n```\nOptions:\n  --ansible VERSION          Use the specified version of Ansible\n  --molecule VERSION         Use the specified version of Molecule\n  --python VERSION           Use the specified version of Python\n  --yamllint VERSION         Use the specified version of YamlLint\n  --ansible-lint VERSION     Use the specified version of Ansible Lint\n  --flake8 VERSION           Use the specified version of Flake8\n  --testinfra VERSION        Use the specified version of Testinfra\n  --use-system-dependencies  Use the system version of Python\n\nEnvironment variables:\n  MOLECULEW_ANSIBLE       Use the specified version of Ansible\n  MOLECULEW_MOLECULE      Use the specified version of Molecule\n  MOLECULEW_PYTHON        Use the specified version of Python\n  MOLECULEW_YAMLLINT      Use the specified version of YamlLint\n  MOLECULEW_ANSIBLE_LINT  Use the specified version of Ansible Lint\n  MOLECULEW_FLAKE8        Use the specified version of Flake8\n  MOLECULEW_TESTINFA      Use the specified version of Testinfra\n  MOLECULEW_USE_SYSTEM    Use system dependencies (true/false)\n```\n\nThe version may be a valid version number, `latest` to freeze to the latest\navailable version, or `default` to keep the frozen version (if set) or otherwise\nfreeze at the current latest version (i.e. the same effect as not specifying\nthe option).\n\nThe above command line arguments take preference over environment variables.\n\ne.g.\n\n```bash\n./moleculew wrapper-freeze\n```\n\nTo upgrade one (or more) of the versions specify the options as follows:\n\n```bash\n./moleculew --ansible latest --molecule 2.16.0 wrapper-freeze\n```\n\n### wrapper-unfreeze\n\nUn-freezes the dependency versions:\n\ne.g.\n\n```bash\n./moleculew wrapper-unfreeze\n```\n\n### wrapper-upgrade-versions\n\nUpgrades any frozen dependency versions to the latest version and freezes all\ndependency versions:\n\ne.g.\n\n```bash\n./moleculew wrapper-upgrade-versions\n```\n\n### wrapper-clean\n\nRemoves all the virtual environments created by Molecule Wrapper. The virtual\nenvironments can use up quite a bit of storage over time so you should run this\nperiodically e.g. every few months.\n\ne.g.\n\n```bash\n./moleculew wrapper-clean\n```\n\n### wrapper-version\n\nDisplays the current version of the wrapper script.\n\ne.g.\n\n```bash\n./moleculew wrapper-version\n```\n\n### wrapper-upgrade\n\nUpgrades the Molecule Wrapper to the latest version.\n\ne.g.\n\n```bash\n./moleculew wrapper-upgrade\n```\n\n### wrapper-install\n\nInstalls Molecule (if necessary). You don't need to use this because the other\ncommands will run the install if they need to. This is included for CI\nenvironments where you might want to separate the console output for the install\nfrom the Molecule output.\n\n```\nOptions:\n  --ansible VERSION          Use the specified version of Ansible\n  --molecule VERSION         Use the specified version of Molecule\n  --python VERSION           Use the specified version of Python\n  --yamllint VERSION         Use the specified version of YamlLint\n  --ansible-lint VERSION     Use the specified version of Ansible Lint\n  --flake8 VERSION           Use the specified version of Flake8\n  --testinfra VERSION        Use the specified version of Testinfra\n  --use-system-dependencies  Use the system version of Python\n\nEnvironment variables:\n  MOLECULEW_ANSIBLE       Use the specified version of Ansible\n  MOLECULEW_MOLECULE      Use the specified version of Molecule\n  MOLECULEW_PYTHON        Use the specified version of Python\n  MOLECULEW_YAMLLINT      Use the specified version of YamlLint\n  MOLECULEW_ANSIBLE_LINT  Use the specified version of Ansible Lint\n  MOLECULEW_FLAKE8        Use the specified version of Flake8\n  MOLECULEW_TESTINFA      Use the specified version of Testinfra\n  MOLECULEW_USE_SYSTEM    Use system dependencies (true/false)\n```\n\nThe version may be a valid version number, `latest` to freeze to the latest\navailable version, or `default` to keep the frozen version (if set) or otherwise\nfreeze at the current latest version (i.e. the same effect as not specifying\nthe option).\n\nThe above command line arguments take preference over environment variables.\n\ne.g.\n\n```bash\n./moleculew wrapper-install\n```\n\n### wrapper-virtualenv\n\nDisplays the location of the Virtualenv environment.\n\n```\nOptions:\n  --ansible VERSION          Use the specified version of Ansible\n  --molecule VERSION         Use the specified version of Molecule\n  --python VERSION           Use the specified version of Python\n  --yamllint VERSION         Use the specified version of YamlLint\n  --ansible-lint VERSION     Use the specified version of Ansible Lint\n  --flake8 VERSION           Use the specified version of Flake8\n  --testinfra VERSION        Use the specified version of Testinfra\n  --use-system-dependencies  Use the system version of Python\n\nEnvironment variables:\n  MOLECULEW_ANSIBLE       Use the specified version of Ansible\n  MOLECULEW_MOLECULE      Use the specified version of Molecule\n  MOLECULEW_PYTHON        Use the specified version of Python\n  MOLECULEW_YAMLLINT      Use the specified version of YamlLint\n  MOLECULEW_ANSIBLE_LINT  Use the specified version of Ansible Lint\n  MOLECULEW_FLAKE8        Use the specified version of Flake8\n  MOLECULEW_TESTINFA      Use the specified version of Testinfra\n  MOLECULEW_USE_SYSTEM    Use system dependencies (true/false)\n```\n\nThe version may be a valid version number, `latest` to freeze to the latest\navailable version, or `default` to keep the frozen version (if set) or otherwise\nfreeze at the current latest version (i.e. the same effect as not specifying\nthe option).\n\nThe above command line arguments take preference over environment variables.\n\ne.g.\n\n```bash\n./moleculew wrapper-virtualenv\n```\n\n## License\n\nThis software is licensed under the terms in the file named \"LICENSE\" in the\nroot directory of this project. This project has dependencies that are under\ndifferent licenses.\n\n## Author Information\n\nJohn Freeman\n\nGantSign Ltd.\nCompany No. 06109112 (registered in England)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgantsign%2Fmolecule-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgantsign%2Fmolecule-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgantsign%2Fmolecule-wrapper/lists"}