- name: Add values from MAPPING_A to FILES_A lineinfile: path: "/PATH_TO/FILES_A/{{ item.0 | basename }}" line: "{{ item.1 }}" insertafter: "^(.*){{ item.1.split('=') | first }}" with_nested: - "{{ lookup('fileglob', '/PATH_TO/MAPPING_A/*.TXT') }}" - "{{ lookup('file', '/PATH_TO/MAPPING_A/{{ item.0 | basename }}.TXT').splitlines() | select() | list }}""{{ lookup('fileglob', '/PATH_TO/MAPPING_A/*.TXT') }}"
"{{ lookup('file', '/PATH_TO/MAPPING_A/{{ item.0 | basename }}.TXT').splitlines() | select() | list }}"

To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7ac2d9e8-bf14-b854-954f-736e8e389c0a%40linuxia.de.
Not so obvious to understand...
Perhaps you should try progressive steps and not wanting to do everything in one unique step
To look for specific file, perhaps you should use the find module with a register
And after loop on these files using the variable registered before...
Regards,
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e9220677-c1a0-4d7f-bf07-336e62ec1be7%40googlegroups.com.