question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

destroy steps do not run when tests fail and tags are used in provisioner options

See original GitHub issue

Issue Type

  • Bug report

Molecule and Ansible details

pipenv run ansible --version && pipenv run molecule --version
ansible 2.7.10
  config file = /Users/deric/.ansible.cfg
  configured module search path = ['/Users/deric/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/deric/.local/share/virtualenvs/molecule-destroy-cLlJrhaP/lib/python3.7/site-packages/ansible
  executable location = /Users/deric/.local/share/virtualenvs/molecule-destroy-cLlJrhaP/bin/ansible
  python version = 3.7.3 (default, Apr  7 2019, 11:57:41) [Clang 10.0.0 (clang-1000.11.45.5)]
molecule, version 2.20.1.dev18

Molecule installation method (one of):

  • pipenv (see Pipfile in example repo and README.md for usage)

Ansible installation method (one of):

  • pipenv (see Pipfile in example repo and README.md for usage)

Detail any linters or test runners used:

Desired Behavior

Destroy steps run when tests fail and tags are used in provisioner: options.

Actual Behaviour

Destroy steps do not run and PLAY RECAP details are missing when tests fail and tags are used in provisioner: options.

See example repo.

provisioner:
  name: ansible
  lint:
    name: ansible-lint
  options:
    tags: no-op
    PLAYBOOK: destroy.yml **********************************************************
    1 plays in /Users/deric/.local/share/virtualenvs/molecule-destroy-cLlJrhaP/src/molecule/molecule/provisioner/ansible/playbooks/docker/destroy.yml
    
    PLAY [Destroy] *****************************************************************
    META: ran handlers
    META: ran handlers
    META: ran handlers
    
    PLAY RECAP *********************************************************************

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dericcragocommented, Apr 10, 2019

I can confirm that #1913 fixes this issue. Thank you @seandst & @decentral1se!

0reactions
seandstcommented, Apr 10, 2019

That’s great to hear! Thanks for testing it, and also thanks for the excellent reproducer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

on-destroy provisioners not being executed · Issue #13549
The only way I've been able to trigger the provisioner is to run 'terraform destroy -target RESOURCE_TYPE.NAME'. This needs to be done manually ......
Read more >
Understanding local-exec provisioner in terraform
Destroy provisioners are run before the resource is destroyed. If they fail, Terraform will error and rerun the provisioners again on the next ......
Read more >
Remove Provisioned Infra with the Terraform Destroy Step
You can add a Terraform Destroy step to remove any provisioned infrastructure, just like running the terraform destroy command. See ...
Read more >
Provisioners | Terraform
Destroy provisioners are run before the resource is destroyed. If they fail, Terraform will error and rerun the provisioners again on the next...
Read more >
kitchen (executable)
Test Kitchen runs tests against any combination of platforms using any ... Any Test Kitchen subcommand that does not specify an instance will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found