Skip to content

Commit

Permalink
Skip create step when created == true (#4038)
Browse files Browse the repository at this point in the history
Fixes: #4037

Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
  • Loading branch information
mluzarreta and ssbarnea authored Oct 17, 2023
1 parent 53e6918 commit d7b93b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/molecule/command/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ def execute(self, action_args=None):
"""
self._config.state.change_state("driver", self._config.driver.name)

if self._config.state.created:
msg = "Skipping, instances already created."
LOG.warning(msg)
return

self._config.provisioner.create()

self._config.state.change_state("created", True)
Expand Down

0 comments on commit d7b93b5

Please sign in to comment.