From d7b93b5b08543c679a9a006e1cabc76de44cd674 Mon Sep 17 00:00:00 2001 From: Manuel Luzarreta Date: Tue, 17 Oct 2023 12:51:02 +0200 Subject: [PATCH] Skip create step when created == true (#4038) Fixes: #4037 Co-authored-by: Sorin Sbarnea --- src/molecule/command/create.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/molecule/command/create.py b/src/molecule/command/create.py index a10bca06ee..a4a96f7c7d 100644 --- a/src/molecule/command/create.py +++ b/src/molecule/command/create.py @@ -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)