И это всё МОЁ

Мне нужно скопировать файл в несколько директорий по списку, но только в те директории, которые реально существуют на диске.

Я пытаюсь сделать через when:

  - name: Копирование индексной страницы во все каталоги документации
copy:
src: "` gitReposPath `/doxygen_documentation/idk2/html/rootindex.html"
dest: "` gitReposPath `/doxygen_documentation/{{ item[gitTable_DirectoryName] }}/html/rootindex.html"
remote_src: yes
when: "` gitReposPath `/doxygen_documentation/{{ item[gitTable_DirectoryName] }}/html/" | is_dir
with_items:
- "` gitRepos `"

Но когда добавляю строку с when, то появляется ошибка:
ERROR! Syntax Error while loading YAML.
did not find expected comment or line break

The error appears to be in '/home/xi/work/develop/cpp/surfProjects/iksProjects/iks_ansible_sсript/level0002-iksCdBuild/step0180-generateDoc.plb.yml': line 51, column 97, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

remote_src: yes
when: "` gitReposPath `/doxygen_documentation/{{ item[gitTable_DirectoryName] }}/html/" | is_dir
^ here
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:

with_items:
- ` foo `

Should be written as:

with_items:
- "` foo `"

Как еще можно сделать копирование? Да, я знаю что можно отключить ошибку failed_when: false, но так делать не хотелось бы.








 ,