From 43291bb5725ca7ebe536b6d9e6deaec1aa491e2c Mon Sep 17 00:00:00 2001 From: Zolfa Date: Wed, 29 Apr 2020 02:09:26 +0200 Subject: [PATCH] roles/nginx: no tag on service and server_name explicit Do not apply tag `packages` to role `service`. Tags are already applied inside the role. If we apply the tag `package` at the role level handlers defined inside the role (restart, reload) are not available in the play! --- roles/nginx/tasks/main.yaml | 2 -- roles/nginx/templates/base.j2 | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/nginx/tasks/main.yaml b/roles/nginx/tasks/main.yaml index ed43bc0..0bc91cb 100644 --- a/roles/nginx/tasks/main.yaml +++ b/roles/nginx/tasks/main.yaml @@ -5,8 +5,6 @@ service_name: 'nginx' service_packages: - 'nginx' - tags: - - 'packages' - name: 'disable nginx default configuration' file: diff --git a/roles/nginx/templates/base.j2 b/roles/nginx/templates/base.j2 index 9c9af35..80c8937 100644 --- a/roles/nginx/templates/base.j2 +++ b/roles/nginx/templates/base.j2 @@ -12,6 +12,8 @@ server { real_ip_header proxy_protocol; {% endif %} + server_name {{ server_fqdn }}; + # Do not advertise nginx version number server_tokens off;