-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature idea: Add a new molecule command to perform check (dry run) #128
Comments
Implemented in #201. |
Opening |
This is in preparation for implementing dry-run ansible#128.
This is in preparation for implementing dry-run ansible#128.
* Renamed check to syntax-check * Implemented a dry-run as check Fixes: ansible#128
This is in preparation for implementing dry-run ansible#128.
This is in preparation for implementing dry-run ansible#128.
This is in preparation for implementing dry-run ansible#128.
This is in preparation for implementing dry-run #128.
@conorsch I think I'm going to need more details on this. I'm not entirely sure how it would be helpful. If we are to add Since |
The ability to call `molecule check` to perform a "Dry Run". This is currently not incorporated into the default test sequence. Fixes: ansible#128
The ability to call `molecule check` to perform a "Dry Run". This is currently not incorporated into the default test sequence. Fixes: ansible#128
The ability to call `molecule check` to perform a "Dry Run". This is currently not incorporated into the default test sequence. Fixes: ansible#128
The ability to call `molecule check` to perform a "Dry Run". This is currently not incorporated into the default test sequence. Fixes: ansible#128
Adding after It's technically possible to support dry-runs of a first-time role run with Ansible, but I don't see many role authors striving for it. For example,
If you run |
Thanks for this, and to anyone finding this in the future, you can add it to your sequence in molecule.yml with: scenario:
name: default
test_sequence:
- lint
- destroy
- dependency
- syntax
- create
- prepare
- converge
- idempotence
# Added --check run test.
- check
- side_effect
- verify
- destroy |
Supporting
--check
mode for Ansible roles isn't trivial; you have to make sure any tasks that register variables are read-only and marked withalways_run: true
. Personally I'm a big fan of leveraging check mode, but I think the difficulty of testing it makes many folks writing Ansible roles leave it by the wayside. Molecule can help with that.As low-hanging fruit during edits for #110, adding an additional (optional) stage for the
test
functionality would be great:Comments welcome.
The text was updated successfully, but these errors were encountered: