Do not fail if item.root is not defined.

This commit is contained in:
Andrea Dell'Amico 2022-06-11 18:04:16 +02:00
parent a8c3397460
commit 017e29776e
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,7 @@
group: root
mode: 0444
loop: '{{ nginx_virthosts }}'
when: nginx_webroot != item.root
when: item.root is defined and nginx_webroot != item.root
when:
- nginx_install_robots_txt
@ -50,4 +50,5 @@
when:
- not nginx_install_robots_txt
- nginx_use_common_virthost
- item.root is defined
tags: [ 'nginx', 'robots_txt' ]