From ef23c054ff3f1927aeff75ae6f5a3cbe71d2cecb Mon Sep 17 00:00:00 2001
From: Sorin Sbarnea <ssbarnea@redhat.com>
Date: Mon, 26 Feb 2024 10:14:12 +0000
Subject: [PATCH] Update documentation for syntax-check[unknown-module]

Related: https://github.com/ansible/ansible-lint/discussions/4048
---
 src/ansiblelint/rules/syntax_check.md | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/ansiblelint/rules/syntax_check.md b/src/ansiblelint/rules/syntax_check.md
index 659e3afab3..4afcfa03c2 100644
--- a/src/ansiblelint/rules/syntax_check.md
+++ b/src/ansiblelint/rules/syntax_check.md
@@ -28,6 +28,14 @@ This rule can produce messages like:
 - `syntax-check[unknown-module]`: couldn't resolve module/action
 - `syntax-check[specific]`: for other errors not mentioned above.
 
+## syntax-check[unknown-module]
+
+The linter relies on ansible-core code to load the ansible code and it will
+produce a syntax error if the code refers to ansible content that is not
+installed. You must ensure that all collections and roles used inside your
+repository are listed inside a [`requirements.yml`](https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-roles-and-collections-from-the-same-requirements-yml-file) file, so the linter can
+install them when they are missing.
+
 ## Problematic code
 
 ```yaml