diff --git a/ansible_testing/modules.py b/ansible_testing/modules.py index 707387f023..9d78644144 100644 --- a/ansible_testing/modules.py +++ b/ansible_testing/modules.py @@ -359,7 +359,8 @@ class ModuleValidator(Validator): except Exception as e: errors.extend(e.errors) - for key, option in doc.get('options', {}).iteritems(): + options = doc.get('options', {}) + for key, option in (options or {}).iteritems(): try: option_schema(option) except Exception as e: