Molecule: run `molecule converge` without running `molecule create`

Created on 23 Oct 2017  路  2Comments  路  Source: ansible-community/molecule

Issue Type

  • Feature request

Molecule and Ansible details

ansible 2.4.0.0
molecule, version 2.3.1
  • Molecule installation method: pip
  • Ansible installation method: pip

Desired Behaviour

run molecule converge without running molecule create

Use case details

I have written a molecule config which uses de delegated driver . In the create.yml playbook I reinstall a physical server from scratch because the ansible role depends in an specific hardware (infiniband adapter).

During the development of the role it would be nice if I could run molecule convenge and skip the molecule create step to test the role without reinstalling the machine from scratch every time (reinstallation takes around 10min)

Is this possible at all?

Most helpful comment

thanks for your help @dj-wasabi . What you suggested is working perfectly. This is what I added to my molecule.yml

scenario:
  name: default
  converge_sequence:
    - prepare
    - converge

Closing this issue.

All 2 comments

Hi. Yes, you can check the following: https://molecule.readthedocs.io/en/latest/configuration.html#scenario

You'll have to your:

scenario:
  name: default

to something like:

scenario:
  name: default
  create_sequence:
    - create
    - prepare
  check_sequence:
    - destroy
    - create
    - prepare
    - converge
    - check
    - destroy
  converge_sequence:
    - prepare
    - converge
  destroy_sequence:
    - destroy
  test_sequence:
    - destroy
    - dependency
    - syntax
    - create
    - prepare
    - converge
    - idempotence
    - lint
    - side_effect
    - verify
    - destroy

The - create is removed from the converge_sequence option.

thanks for your help @dj-wasabi . What you suggested is working perfectly. This is what I added to my molecule.yml

scenario:
  name: default
  converge_sequence:
    - prepare
    - converge

Closing this issue.

Was this page helpful?
0 / 5 - 0 ratings