summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseachanged <dll@sonic.net>2022-11-17 12:48:50 -0800
committerGitHub <noreply@github.com>2022-11-17 15:48:50 -0500
commit6cec31574f8e19059b447a2d5f4fe5763d721403 (patch)
tree2b3d9e41b5d0ee2730c8e026acc378be35585de7
parentf089aae5eef8c11934cb58b8139de004ba89588d (diff)
downloadansible-6cec31574f8e19059b447a2d5f4fe5763d721403.tar.gz
Update fileglob.py (#78887)
Improve documentation for relative file paths
-rw-r--r--docs/docsite/rst/playbook_guide/playbook_pathing.rst1
-rw-r--r--lib/ansible/plugins/lookup/fileglob.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/docs/docsite/rst/playbook_guide/playbook_pathing.rst b/docs/docsite/rst/playbook_guide/playbook_pathing.rst
index d52f3a708c..a049ef0f1c 100644
--- a/docs/docsite/rst/playbook_guide/playbook_pathing.rst
+++ b/docs/docsite/rst/playbook_guide/playbook_pathing.rst
@@ -14,6 +14,7 @@ Config paths
By default these should be relative to the config file, some are specifically relative to the current working directory or the playbook and should have this noted in their description. Things like ssh keys are left to use the current working directory because it mirrors how the underlying tools would use it.
+.. _playbook_task_paths:
Task paths
==========
diff --git a/lib/ansible/plugins/lookup/fileglob.py b/lib/ansible/plugins/lookup/fileglob.py
index b1ee05a2f9..abf8202ef4 100644
--- a/lib/ansible/plugins/lookup/fileglob.py
+++ b/lib/ansible/plugins/lookup/fileglob.py
@@ -18,6 +18,7 @@ DOCUMENTATION = """
required: True
notes:
- Patterns are only supported on files, not directory/paths.
+ - See R(Ansible task paths,playbook_task_paths) to understand how file lookup occurs with paths.
- Matching is against local system files on the Ansible controller.
To iterate a list of files on a remote node, use the M(ansible.builtin.find) module.
- Returns a string list of paths joined by commas, or an empty list if no files match. For a 'true list' pass C(wantlist=True) to the lookup.