ansible / molecule

Molecule aids in the development and testing of Ansible content: collections, playbooks and roles
https://ansible.readthedocs.io/projects/molecule/
MIT License
3.89k stars 664 forks source link

Document `--base-config` and `env-file` + add new project local defaults #1841

Open ssbarnea opened 5 years ago

ssbarnea commented 5 years ago

Current base configuration is fully undocumented. The page that is most likely to describe it contain nothing https://molecule.readthedocs.io/en/latest/configuration.html and neither other page of the documentation.

We not only need to document this but also make molecule load its base configuration automatically by discovering it from the code repository.

For local development is ok to keep configuration in a ~/.config but any colaborative project would expect to have a git hosted base config file that would be found and used when molecule is run.

decentral1se commented 5 years ago

Asked for in https://github.com/ansible/molecule/issues/1423#issuecomment-474963763 as well :+1:

tace commented 5 years ago

Good there is already ticket for this! +1 for the documentation. Trying to try/error how it works.

Please document also --env-file option.

decentral1se commented 5 years ago

Right, we have auto-loading already:

I'd like to suggest then to close this off that we provide new default paths:

We document this and keep loading from the existing defaults to not break anyones use case.

Thoughts?

WithoutAnAce commented 5 years ago

Is there a default env.yml path already, or is this a proposed change?

dzintars commented 1 year ago

Yeah, molecule --base-config .config/molecule/config.yml converge -s dev -- --limit workstations --tags nushell --list-tasks is a little bit verbose. I would like to drop base-config and scenario flags when iterating on some constant setup. But definitely "nice-to-have" thing.

dzintars commented 1 year ago

Similar issue https://github.com/ansible-community/molecule/issues/1664