diff --git a/defaults/main.yml b/defaults/main.yml index 606961f..061db57 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,8 +1,8 @@ --- -nginx_enabled: True -nginx_use_ppa: False +nginx_enabled: true +nginx_use_ppa: false nginx_ppa_repo: ppa:nginx/stable -nginx_use_nginx_org_repo: False +nginx_use_nginx_org_repo: false nginx_org_repo_key: 'https://nginx.org/keys/nginx_signing.key' nginx_org_repo: 'deb http://nginx.org/packages/ubuntu/ bionic nginx' nginx_package_state: present @@ -17,7 +17,7 @@ nginx_ssl_session_cache_size: '8096k' nginx_ssl_session_timeout: '10m' nginx_ssl_stapling: true nginx_strict_transport_security_expire: 15768000 -nginx_strict_transport_security_include_subdomains: False +nginx_strict_transport_security_include_subdomains: false nginx_snippets_dir: /etc/nginx/snippets @@ -47,7 +47,7 @@ nginx_client_header_buffer_size: '{{ nginx_default_max_buffers_size }}k' nginx_client_body_buffer_size: '{{ nginx_default_max_buffers_size }}k' nginx_large_client_header_buffers: '4 {{ nginx_default_max_buffers_size }}k' -nginx_enable_compression: True +nginx_enable_compression: true nginx_gzip_vary: "on" nginx_gzip_proxied: any nginx_gzip_comp_level: 6 @@ -55,19 +55,19 @@ nginx_gzip_buffers: 16 8k nginx_gzip_http_version: 1.1 nginx_gzip_types: "text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript" -nginx_enable_browser_cache: True +nginx_enable_browser_cache: true nginx_cache_control: public nginx_html_cache_expire: -1 -nginx_feed_cache_expire_enabled: False +nginx_feed_cache_expire_enabled: false nginx_feed_cache_expire: 1h nginx_media_cache_expire: 1M nginx_css_js_cache_expire: -1 -nginx_reverse_proxy: False -nginx_define_x_real_ip: False -nginx_proxy_define_header_host: True +nginx_reverse_proxy: false +nginx_define_x_real_ip: false +nginx_proxy_define_header_host: true nginx_proxy_header_x_forwarded_proto: "$scheme" -nginx_set_original_uri: True +nginx_set_original_uri: true nginx_proxy_buffering: "on" nginx_proxy_redirect: "off" nginx_x_forwarded_host: "$remote_addr" @@ -80,14 +80,14 @@ nginx_proxy_read_timeout: 480s nginx_proxy_send_timeout: 120s nginx_proxy_temp_file_write_size: '{{ nginx_default_proxy_buffers_size * 2 }}k' nginx_proxy_force_ranges: "off" -nginx_behind_haproxy_settings: True +nginx_behind_haproxy_settings: true nginx_client_max_body_size: 100M nginx_client_body_timeout: 240s -nginx_cors_enabled: False -nginx_cors_global: True -nginx_cors_limit_origin: True -nginx_cors_extended_rules: False +nginx_cors_enabled: false +nginx_cors_global: true +nginx_cors_limit_origin: true +nginx_cors_extended_rules: false nginx_cors_acl_origin: 'http?://(localhost)' # Possible methods: # CONNECT, DEBUG, DELETE, DONE, GET, HEAD, HTTP, HTTP/0.9, HTTP/1.0, HTTP/1.1, HTTP/2, OPTIONS, ORIGIN, ORIGINS, PATCH, POST, PUT, QUIC, REST, SESSION, SHOULD, SPDY, TRACE, TRACK @@ -97,9 +97,9 @@ nginx_cors_allowed_methods: 'GET, POST, OPTIONS' nginx_cors_allowed_headers: 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With,Accept-Language,X-CustomHeader,Content-Range,Range,Observe' # Set them only if the application behind the server does not set them by itself. -nginx_set_xss_protection: False -nginx_set_content_security_options: False -nginx_disable_content_security_options: False +nginx_set_xss_protection: false +nginx_set_content_security_options: false +nginx_disable_content_security_options: false # Choiches: 'self', 'none', a list of domains nginx_content_security_src_acl: - "'self'" @@ -109,37 +109,37 @@ nginx_content_security_ancestor_acl: - "'self'" # - "'none'" # - '{{ ansible_domain }}' -nginx_set_frame_origin: False +nginx_set_frame_origin: false # SAMEORIGIN, DENY, '' nginx_x_frame_options: 'SAMEORIGIN' # Find a set of acceptable defaults for the cache setup -nginx_cache_enabled: False +nginx_cache_enabled: false -nginx_use_ldap_pam_auth: False +nginx_use_ldap_pam_auth: false nginx_pam_svc_name: nginx nginx_ldap_uri: "ldap://ldap.example.org" nginx_ldap_base_dn: "dc=example,dc=org" -nginx_basic_auth: False +nginx_basic_auth: false nginx_basic_auth_users: [] # - { name: 'test', pwd: 'hide inside a vault file', file: '/etc/nginx/htpasswd' } # nginx_ldap_login_attribute: uid # nginx_ldap_pam_groupdn: nginx_webroot: /usr/share/nginx/html -nginx_letsencrypt_managed: True -nginx_websockets_support: False +nginx_letsencrypt_managed: true +nginx_websockets_support: false # When we do not use letsencrypt: # nginx_ssl_cert_file: '{{ pki_dir }}/certs/nginx.crt' # nginx_ssl_cert_key: '{{ pki_dir }}/keys/nginx.key' -nginx_block_dotfiles: True +nginx_block_dotfiles: true # k,M,G nginx_logrotate_maxfilesize: "1G" nginx_logrotate_retention: "52" -nginx_install_robots_txt: False -nginx_robots_disallow_everything: False -nginx_robots_enable_crawl_delay: False +nginx_install_robots_txt: false +nginx_robots_disallow_everything: false +nginx_robots_enable_crawl_delay: false nginx_robots_crawl_delay: 10 nginx_robots_disallowed_useragent_list: - SemrushBot @@ -147,7 +147,7 @@ nginx_robots_disallowed_useragent_list: - Yandex - YandexBot -nginx_robots_disallowed_uris: False +nginx_robots_disallowed_uris: false nginx_robots_disallowed_uris_list: [] # List any options here, ending with ; @@ -155,7 +155,7 @@ nginx_robots_disallowed_uris_list: [] # Virtualhost example nginx_virthosts: [] # - virthost_name: '{{ ansible_fqdn }}' -# plain_http_enabled: True +# plain_http_enabled: true # listen: '{{ http_port }}' # server_name: '{{ ansible_fqdn }}' # server_aliases: '' @@ -165,13 +165,13 @@ nginx_virthosts: [] # servers: # - 127.0.0.1:4000 fail_timeout=0 # error_page: /path_to_error_page.html -# ssl_enabled: False -# ssl_only: False +# ssl_enabled: false +# ssl_only: false # ssl_letsencrypt_certs: '{{ nginx_letsencrypt_managed }}' # root: {{ nginx_webroot }} # server_tokens: 'off' # additional_options: [] -# proxy_standard_setup: True +# proxy_standard_setup: true # proxy_global_additional_options: # - 'proxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=cache:30m max_size=250m' # locations: diff --git a/meta/main.yml b/meta/main.yml index 4410ceb..a348239 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,24 +1,22 @@ galaxy_info: author: Andrea Dell'Amico - description: Systems Architect + description: Role that installs and configures nginx company: ISTI-CNR - - issue_tracker_url: https://redmine-s2i2s.isti.cnr.it/projects/provisioning - + namespace: adellam + role_name: nginx license: EUPL 1.2+ - min_ansible_version: 2.8 - - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ + min_ansible_version: "2.9" # platforms: - name: Ubuntu versions: - bionic + - focal + - jammy galaxy_tags: - - users + - nginx dependencies: - src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-ldap-client-config.git