From 889024e10198e216f76eed3b6d14cc7835e2139f Mon Sep 17 00:00:00 2001 From: Keith Maxwell Date: Sun, 7 Apr 2019 16:24:48 +0100 Subject: [PATCH] Clarify example for fileglob lookup plugin (#54941) fileglob returns a list of paths it does not return file contents, as explained in latest notes. The file lookup retrieves file contents. This change clarifies the first example to make it clear a paths, not contents, are returned. It also adds spaces around the lookup to avoid E206 from ansible-lint: "Variables should have spaces before and after: {{ var_name }}" +label: docsite_pr --- lib/ansible/plugins/lookup/fileglob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/lookup/fileglob.py b/lib/ansible/plugins/lookup/fileglob.py index 67a7c07033a..91442dda5e1 100644 --- a/lib/ansible/plugins/lookup/fileglob.py +++ b/lib/ansible/plugins/lookup/fileglob.py @@ -24,8 +24,8 @@ DOCUMENTATION = """ """ EXAMPLES = """ -- name: display content of all .txt files in dir - debug: msg={{lookup('fileglob', '/my/path/*.txt')}} +- name: Display paths of all .txt files in dir + debug: msg={{ lookup('fileglob', '/my/path/*.txt') }} - name: Copy each file over that matches the given pattern copy: