diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2019-10-03 19:48:56 -0400 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2019-10-03 19:48:56 -0400 |
| commit | e01f450ec79c8fe736d5a0ea7edb2812fcc1fc96 (patch) | |
| tree | d04727596b28b4e6f3106336d58132cd917e9824 | |
| parent | ef3b16ef576cf4e0cffc58ff57ccd2ad250cc9e0 (diff) | |
| download | nginx-e01f450ec79c8fe736d5a0ea7edb2812fcc1fc96.tar.gz nginx-e01f450ec79c8fe736d5a0ea7edb2812fcc1fc96.tar.xz | |
Pull out the default listen into a var
| -rw-r--r-- | defaults/main.yml | 7 | ||||
| -rw-r--r-- | templates/nginx/nginx.conf | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/defaults/main.yml b/defaults/main.yml index 578e5c8..19ac5c8 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -22,6 +22,13 @@ nginx_acme_challenge_block: | } +# The default server listens on port 80 normally, you can change that if you +# like +nginx_default_listen: | + listen 80; + listen [::]:80; + + # If "True" it will template out {{ansible_hostname}}/nginx/nginx.conf instead # of nginx/nginx.conf nginx_custom_template: False diff --git a/templates/nginx/nginx.conf b/templates/nginx/nginx.conf index 14079a2..08765d7 100644 --- a/templates/nginx/nginx.conf +++ b/templates/nginx/nginx.conf @@ -20,8 +20,7 @@ http { server_tokens off; server { - listen 80; - listen [::]:80; + {{nginx_default_listen}} server_name localhost; include acme-challenge; |
