So I have the following tasks in my playbook
- name: gather package facts package_facts:- name: send packages containing 'fence-agents' to a file lineinfile: path: /etc/leapp/transaction/to_remove line: "{{ item }}" loop: "{{ ansible_facts.packages | ???????" become: true
Is there anyway to extract a list with all packages which contain the string fence-agents
?
I don't want to loop the entire package list as it would increase the playbook run time significantly.