Commit Graph

1 Commits (c3323591213c8388d3bbc2564e9349e0a5330801)

Author SHA1 Message Date
Matt Davis 51852557df
add optional module_utils import support (#73832) (#73918)
Treat core and collections module_utils imports nested within any Python block statement (eg, `try`, `if`) as optional. This allows Ansible modules to implement runtime fallback behavior for missing module_utils (eg from a newer version of ansible-core), where previously, the module payload builder would always fail when unable to locate a module_util (regardless of any runtime behavior the module may implement).

* sanity test fixes

(cherry picked from commit 3e1f6484d7)
4 years ago