Last active
April 14, 2020 16:29
-
-
Save RunsFor/b0cebd29c91b7c1248cae70f6dcf0adc to your computer and use it in GitHub Desktop.
fileglob lookup plugin does not search playbook dir
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19:16:12 level2 [master] tree | |
├── file.txt | |
├── files | |
│ └── file.txt | |
├── hosts.yml | |
├── main.yml | |
└── roles | |
└── lookup | |
└── tasks | |
└── main.yml | |
4 directories, 5 files | |
19:17:28 level2 [master] cat file.txt files/file.txt | |
Root file | |
files/ file | |
19:20:06 level2 [master] cat main.yml | |
--- | |
- hosts: core | |
tasks: | |
- name: Import role lookup | |
import_role: | |
name: lookup | |
vars: | |
path: "{{ lookup('fileglob', '*.txt', ansible_search_path=vars.playbook_dir) }}" | |
19:20:09 level2 [master] cat roles/lookup/tasks/main.yml | |
--- | |
- debug: | |
var: path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment