with_first_found issue

Hello all,

I have this part of a playbbok

- shell: echo "{{ ansible_env.CMS_PLI }}/conf/application.conf"
  register: pli_loc
- shell: echo "{{ ansible_env.CMS }}/conf/application.conf"
  register: cms_loc
- shell: "echo {{ item }}"
  with_first_found:
    - "{{ pli_loc.stdout }}"
    - "{{ cms_loc.stdout }}"
    - "{{ ansible_env.CMS_PLI }}/conf/application.conf"
    - /etc/passwd

First and second shell output are ok, the files exist, location is good, but the third shell outputs only /etc/passwd

I would like the third shell output to be one of {{ pli_loc.stdout }} or {{ cms_loc.stdout}}

Why doesn’t it find one of the first ones?

lookups (stuff after with_) execute always on the ‘master’ not on the target machine, so the files have to be accessible on that path on the machine that runs ansible.