From 3a6ca0b4a6153fc42e7fe4c32159d4844e6d52fb Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 5 May 2016 17:02:39 -0400 Subject: [PATCH] made ansible-doc complain on missing 'requried' --- lib/ansible/cli/doc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index 65b4327aea..27c3eea9d3 100644 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -219,7 +219,9 @@ class DocCLI(CLI): opt = doc['options'][o] desc = CLI.tty_ify(" ".join(opt['description'])) - required = opt.get('required', False) + required = opt.get('required') + if required is None: + raise("Missing required field 'Required'") if not isinstance(required, bool): raise("Incorrect value for 'Required', a boolean is needed.: %s" % required) if required: