main.yml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ---
  2. # Used only for Debian/Ubuntu installation, as the -t option for apt.
  3. nginx_default_release: ""
  4. # Used only for Redhat installation, enables source Nginx repo.
  5. nginx_yum_repo_enabled: true
  6. # Use the official Nginx PPA for Ubuntu, and the version to use if so.
  7. nginx_ppa_use: false
  8. nginx_ppa_version: stable
  9. # The name of the nginx apt/yum package to install.
  10. nginx_package_name: "nginx"
  11. nginx_conf_template: "nginx.conf.j2"
  12. nginx_vhost_template: "vhost.j2"
  13. nginx_worker_processes: "{{ ansible_processor_vcpus | default(ansible_processor_count) }}"
  14. nginx_worker_connections: "1024"
  15. nginx_multi_accept: "off"
  16. nginx_error_log: "/var/log/nginx/error.log warn"
  17. nginx_access_log: "/var/log/nginx/access.log main buffer=16k"
  18. nginx_sendfile: "on"
  19. nginx_tcp_nopush: "on"
  20. nginx_tcp_nodelay: "on"
  21. nginx_keepalive_timeout: "65"
  22. nginx_keepalive_requests: "100"
  23. nginx_server_tokens: "on"
  24. nginx_client_max_body_size: "64m"
  25. nginx_server_names_hash_bucket_size: "64"
  26. nginx_proxy_cache_path: ""
  27. nginx_extra_conf_options: ""
  28. # Example extra main options, used within the main nginx's context:
  29. # nginx_extra_conf_options: |
  30. # env VARIABLE;
  31. # include /etc/nginx/main.d/*.conf;
  32. nginx_extra_http_options: ""
  33. # Example extra http options, printed inside the main server http config:
  34. # nginx_extra_http_options: |
  35. # proxy_buffering off;
  36. # proxy_set_header X-Real-IP $remote_addr;
  37. # proxy_set_header X-Scheme $scheme;
  38. # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  39. # proxy_set_header Host $http_host;
  40. nginx_remove_default_vhost: false
  41. nginx_vhosts: []
  42. # Example vhost below, showing all available options:
  43. # - listen: "80 default_server" # default: "80 default_server"
  44. # server_name: "example.com" # default: N/A
  45. # root: "/var/www/example.com" # default: N/A
  46. # index: "index.html index.htm" # default: "index.html index.htm"
  47. #
  48. # # Properties that are only added if defined:
  49. # error_page: ""
  50. # access_log: ""
  51. # error_log: ""
  52. # extra_parameters: "" # Can be used to add extra config blocks (multiline).
  53. # state: "absent" # To remove the vhost configuration.
  54. nginx_upstreams: []
  55. # - name: myapp1
  56. # strategy: "ip_hash" # "least_conn", etc.
  57. # keepalive: 16 # optional
  58. # servers: {
  59. # "srv1.example.com",
  60. # "srv2.example.com weight=3",
  61. # "srv3.example.com"
  62. # }
  63. nginx_log_format: |
  64. '$remote_addr - $remote_user [$time_local] "$request" '
  65. '$status $body_bytes_sent "$http_referer" '
  66. '"$http_user_agent" "$http_x_forwarded_for"'