From 017e29776e3716f582bfe6e30557996c9370576c Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Sat, 11 Jun 2022 18:04:16 +0200 Subject: [PATCH] Do not fail if item.root is not defined. --- tasks/robots-txt.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/robots-txt.yml b/tasks/robots-txt.yml index e800495..3b98fef 100644 --- a/tasks/robots-txt.yml +++ b/tasks/robots-txt.yml @@ -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' ]