From da19e17bf2f0095fe7992488b5f8828b5ddf5047 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 13 Oct 2022 16:54:55 +0200 Subject: [PATCH] Check the lenght of nginx_virtualhosts. --- defaults/main.yml | 1 - tasks/main.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 26744c3..be212ec 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -150,7 +150,6 @@ nginx_robots_disallowed_uris: False nginx_robots_disallowed_uris_list: [] # List any options here, ending with ; -nginx_use_common_virthost: False # # Virtualhost example nginx_virthosts: [] diff --git a/tasks/main.yml b/tasks/main.yml index 92d26c1..268d6f9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -5,7 +5,7 @@ when: ansible_distribution_file_variety == "RedHat" - import_tasks: nginx-config.yml - import_tasks: nginx-virtualhosts.yml - when: nginx_use_common_virthost | bool + when: nginx_virtualhosts | empty - import_tasks: robots-txt.yml - import_tasks: nginx-logrotate.yml - import_tasks: nginx-letsencrypt.yml