aboutsummaryrefslogtreecommitdiff
path: root/defaults/main.yml
blob: 462d0258e39c6dad76f8b689c119770dd4a8ffae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
# These need to be strings to be parsed properly
nginx_conf_dir_mode: '0770'
nginx_conf_file_mode: '0640'

nginx_conf_owner: root
nginx_conf_group: adm

nginx_conf_dir: "/etc/nginx"


# The default server listens on port 80 normally, you can change that if you
# like
nginx_default_listen: |
  listen	   80;
  listen	   [::]:80;


nginx_includes:
  acl: |
    # RFC 1918 addresses
    allow 172.16.0.0/12;
    allow 192.168.0.0/16;
    allow 10.0.0.0/8;
    allow 127.0.0.0/8;
    deny all;
  acme-challenge: |
    location /.well-known/acme-challenge {
      # e.g.
      # acme.sh --issue -d my-domain.com -w /var/lib/acme-challenge/
      root /var/lib/acme-challenge;
    }

# nginx_confd:
#   node_exporter.conf: |
#     server {
#       listen 49050;
#       listen [::]:49050;
# 
#       location / {
#         include acl;
#         proxy_pass http://127.0.0.1:9100;
#       }
#     }

nginx_robots:
  - name: allow
    robots_txt: |
      User-agent: CuteStat
      Disallow: /

      User-agent: *
      Allow: /
  - name: disallow
    robots_txt: |
      User-agent: CuteStat
      Disallow: /

      User-agent: *
      Disallow: /

nginx_conf: |
  worker_processes  auto;

  events {
    worker_connections 1024;
  }


  http {
    include     mime.types;
    default_type  application/octet-stream;

    sendfile    on;
    #tcp_nopush   on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    gzip  on;

    server_tokens off;

    server {
      {{nginx_default_listen}}
      server_name  localhost;

      include acme-challenge;

      location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
      }

      location /stub_status {
        stub_status;
        access_log off;
        allow 127.0.0.1;
        deny all;
       }

      error_page   500 502 503 504  /50x.html;
      location = /50x.html {
        root   /usr/share/nginx/html;
      }
    }

    include conf.d/*.conf;

  }