Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Check mode for a tasks in converge.yml in molecule #537

Unanswered
Kritika-Bhateja-03 asked this question in Q&A
Discussion options

I have written a role and proceeding with testing it using molecule.
I want to run my converge.yml in check mode. I tried below options but not working -

  1. scenario:
    name: default
    test_sequence:

    • dependency
    • lint
    • destroy
    • syntax
    • create
    • converge
    • check
      Passed "check" in test sequence but didnt work out for me.
  2. provisioner:
    name: ansible
    config_options:
    defaults:
    check_mode: true
    This also dint work for me.

If anyone could suggest way out for this.

You must be logged in to vote

Replies: 1 comment

Comment options

Since I've run into this page on my quest to figure out the same thing, here is what I figured out... Putting the following lines in molecule.yml will do the trick:

provisioner:
 name: ansible
 options:
 check: true

This is documented in the molecule documentation, but it is not necessarily obvious - https://ansible.readthedocs.io/projects/molecule/configuration/#provisioner

The key is the options dict. Anything that you set there will be passed by molecule as an option to ansible-playbook.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /