26
26
from shutil import which
27
27
from typing import Dict
28
28
29
- from ansible_compat .ports import cache
30
29
from ansible_compat .runtime import Runtime
31
30
from molecule import logger , util
32
31
from molecule .api import Driver , MoleculeRuntimeWarning
@@ -167,6 +166,7 @@ def __init__(self, config=None):
167
166
# An example could be MOLECULE_PODMAN_EXECUTABLE=podman-remote
168
167
self .podman_exec = os .environ .get ("MOLECULE_PODMAN_EXECUTABLE" , "podman" )
169
168
self ._podman_cmd = None
169
+ self ._sanity_passed = False
170
170
171
171
@property
172
172
def podman_cmd (self ):
@@ -214,9 +214,11 @@ def ansible_connection_options(self, instance_name):
214
214
"ansible_podman_executable" : f"{ self .podman_exec } " ,
215
215
}
216
216
217
- @cache
218
217
def sanity_checks (self ):
219
218
"""Implement Podman driver sanity checks."""
219
+ if self ._sanity_passed :
220
+ return
221
+
220
222
log .info ("Sanity checks: '%s'" , self ._name )
221
223
# TODO(ssbarnea): reuse ansible runtime instance from molecule once it
222
224
# fully adopts ansible-compat
@@ -237,6 +239,7 @@ def sanity_checks(self):
237
239
"Do not raise any bugs if your tests are failing with current configuration." ,
238
240
category = MoleculeRuntimeWarning ,
239
241
)
242
+ self ._sanity_passed = True
240
243
241
244
@property
242
245
def required_collections (self ) -> Dict [str , str ]:
0 commit comments