From a02ddbb53f167946db96b8e8c8c0bfc96d46cf46 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sat, 23 Jun 2018 13:56:16 -0500 Subject: [PATCH] roles/apache: Support setting ServerTokens The `apache_server_tokens` variable can now be set, which controls the value of the `ServerTokens` directive. If the variable is set, the `ServerTokens` directive will be added to the `00-servername.conf` file. --- roles/apache/templates/servername.httpd.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/apache/templates/servername.httpd.conf.j2 b/roles/apache/templates/servername.httpd.conf.j2 index 9b6204e..f28276a 100644 --- a/roles/apache/templates/servername.httpd.conf.j2 +++ b/roles/apache/templates/servername.httpd.conf.j2 @@ -10,3 +10,7 @@ ServerName {{ apache_server_name }} {% else %} #ServerName www.example.com:80 {% endif %} +{% if apache_server_tokens is defined %} + +ServerTokens {{ apache_server_tokens }} +{% endif %}