Ansibleで「AnsibleError: template error while templating string: Encountered unknown tag 」エラー
Ansibleでphp-fpmのwww.confを更新しようと思ってレシピとテンプレートを書いて実行したら
fatal: [HOSTNAME]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: Encountered unknown tag 'Y'.. String: ; Start a new pool named 'www'.\n; the variable $pool can we used in any directive and will be replaced by the\n; pool name ('www' here)\n[www]\n\n; Per pool prefix\n; It only applies on the following directives:\n; - 'access.log'\n; - 'slowlog'\n; - 'listen' (unixsocket)\n; - 'chroot'\n; - 'chdir'\n; - 'php_values'\n; ・ ・
あれっおかしいな・・・インストール直後のwww.confをべた張りしただけなのにエラーとは・・
設定ファイルの中のどこかの文字列が誤認識されてエラーになってる模様
困ったときは公式ドキュメント
Advanced Syntax — Ansible Documentation
{% raw %} 内容 {% endraw %}
エラーになっている箇所を上記タグで囲めば解決しました