---
- name: "π Matomo | Stat rendered body_filter Lua of candidate web-svc matomo consumers"
ansible.builtin.stat:
path: "{{ lookup('nginx', 'files.lua', lookup('domain', matomo_inj_consumer.id)) }}"
loop: "{{ lookup('roles_with_service', 'matomo', scope='all') | selectattr('id', 'match', '^web-svc-') | list }}"
loop_control:
loop_var: matomo_inj_consumer
label: "{{ matomo_inj_consumer.id }}"
register: matomo_inj_candidates
changed_when: false
- name: "π Matomo | Re-render injection for every vhost of the deployed web-svc consumers"
ansible.builtin.include_tasks: 08_reinject_consumers/vhosts.yml
loop: "{{ matomo_inj_candidates.results | selectattr('stat.exists', 'defined') | selectattr('stat.exists') | list }}"
loop_control:
loop_var: matomo_inj_dir
label: "{{ matomo_inj_dir.matomo_inj_consumer.id }}"