diff --git a/.dictionary b/.dictionary index 939922cd..8df7bca1 100644 --- a/.dictionary +++ b/.dictionary @@ -10,3 +10,4 @@ ansible-.+ toc GPL-3.0 (P|p)re-(C|c)ommit +JSON diff --git a/ansibledoctor/annotation.py b/ansibledoctor/annotation.py index de6560b1..4f7979d3 100644 --- a/ansibledoctor/annotation.py +++ b/ansibledoctor/annotation.py @@ -119,7 +119,7 @@ def _get_annotation_data(self, num, line, name, rfile): if parts[2] not in multiline_char and parts[2].startswith("$"): source = parts[2].replace("$", "").strip() - content = self._str_to_json(key, source, rfile, num, line) + content = self._str_to_json(key, source, rfile, num) item.data[key][parts[1]] = content diff --git a/ansibledoctor/doc_parser.py b/ansibledoctor/doc_parser.py index 7f79fb13..382ad13f 100644 --- a/ansibledoctor/doc_parser.py +++ b/ansibledoctor/doc_parser.py @@ -74,7 +74,7 @@ def _parse_task_tags(self): tags = [] for task in raw: - task_tags = task.get("tags") + task_tags = task.get("tags", []) if isinstance(task_tags, str): task_tags = [task_tags] diff --git a/docs/content/usage/configuration.md b/docs/content/usage/configuration.md index e265af4c..6a7a4df1 100644 --- a/docs/content/usage/configuration.md +++ b/docs/content/usage/configuration.md @@ -127,11 +127,15 @@ options: ## Environment Variables +{{< hint type=note >}} +List configuration options need to be passed as JSON strings. +{{< /hint >}} + ```Shell ANSIBLE_DOCTOR_BASE_DIR= ANSIBLE_DOCTOR_DRY_RUN=False -ANSIBLE_DOCTOR_EXCLUDE_FILES= -ANSIBLE_DOCTOR_EXCLUDE_TAGS= +ANSIBLE_DOCTOR_EXCLUDE_FILES="['molecule/']" +ANSIBLE_DOCTOR_EXCLUDE_TAGS="[]" ANSIBLE_DOCTOR_ROLE__NAME= ANSIBLE_DOCTOR_ROLE__AUTODETECT=True