Description
This role is the top level package of all www categorised software and does not provide a special software product.
Requirement
Roles
- package.lang.php.fpm (if www_php_enabled is
true
)
Variables
-
www_config_file
- description:
- This option specifies the configuration file to be installed.
- default: undefined
- description:
-
www_config_dest_file
- description:
- This option specifies the destination path of the configuration file.
- default: undefined
- description:
-
www_pid_file
- description:
- This option defines the path to the PID file.
- default: undefined
- description:
-
www_root_directory
- description:
- path to the root directory of the web service
- default: /var/www
- description:
-
www_default_mimetype
- description:
- This option specifies the default MIME type
- default: "text/plain"
- description:
-
www_mimetypes
- descriptions:
- list of known mimetypes
- default: []
- descriptions:
-
www_default_charset
- description:
- This options specifies the default charset.
- default: "utf-8"
- description:
-
www_list_directory
- description:
- enables the listing of a directory
- default: false
- description:
-
www_index_files
- description:
- list of index files
- default: ["index.html"]
- description:
-
www_user
- description:
- The username for the www directory and the service.
- default: www
- description:
-
www_group
- description:
- The groupname for the www directory and the service.
- default: www
- description:
-
www_servername
- description:
- The default name of der www hostname.
- default: "{{ inventory_hostname }}"
- description:
-
www_servertoken_enabled
- description:
- This option enables/disables the server token of a web service.
- choices: [false, true]
- default: false
- description:
-
www_ssl_priv_key
- description:
- The SSL private key for the service.
- default: ""
- description:
-
www_ssl_cert
- description:
- The SSL certificate for the service.
- default: ""
- description:
-
www_ssl_ca_cert
- description:
- The SSL CA certificate for the service.
- default: ""
- description:
-
www_ssl_selfsigned
- description:
- This option specifies if selfsigned SSL certificates are used.
- If it is
true
the selfsigned SSL certificates are generated.
- choices: [false, true]
- default: false
- description:
-
www_ssl_cert_dest_path
- description:
- The default destination directory for the SSL certificate for the service.
- default: "{{ '%s/ssl/certs/%s' | format(system_config_directory, www_ssl_cert | basename) }}"
- description:
-
www_ssl_priv_key_dest_path:
- description:
- The default destination directory for the SSL private key for the service.
- default: "{{ '%s/ssl/private/%s' | format(system_config_directory, www_ssl_priv_key | basename) }}"
- description:
-
www_listen
- description:
- This option is a list of listening settings
_www_listen
.
- This option is a list of listening settings
- default: [{"port": 80}]
- description:
-
_www_listen
-
description:
- This option is a item of
www_listen
and contains a dictionary with the default listening settings.
- This option is a item of
-
keys:
- port
- description:
- This option contains the TCP port.
- default: 80
- description:
- port
-
address
- description:
- This option contains the IP address for binding.
- default: ""
- description:
-
use_ssl
- description:
- This option enables/disables SSL for TLS connection
- choices: [false, true]
- default: false
- description:
-
redirect_to_ssl
- description:
- This option specifies if a connection is redirected to a SSL port.
- choices: [false, true]
- default: false
- description:
-
-
www_log_files_path
- description:
- The standard log-file directory
- default: "/var/log"
- description:
-
www_error_file
- description:
- This option specifies the path to the global error log file.
- default: "error.log"
- description:
-
www_modules
- description:
- This option contains a list of modules, which should be loaded.
- default: []
- description:
-
www_error_level
- description:
- This option specifies the standard error level.
- default: "warn"
- description:
-
www_error_documents
- description:
- This option is a list of _www_error_document
- default: []
- description:
-
_www_error_document
- description:
- This option is a dictionary with the error code and its error page.
- keys:
-
codes
- description:
- This key contains a list of error codes.
- default: undefined
- description:
-
page
- description:
- This key specifies the path to the corresponting error page.
- It can be also a simple string.
- default: undefined
- description:
-
- description:
-
www_sendfile
- description:
- This option enables/disables the sendfile support of the kernels to send file to a client.
- choices: [false, true]
- default: true
- description:
-
www_http2_enabled
- description:
- This option enables/disables the HTTP/2 support.
- choices: [false, true]
- default: false
- description:
-
www_header_fields
- description:
- This option contains a list of header fields to be set.
- The item type is
_www_header_field
.
- default: []
- description:
-
_www_header_field
- description:
- This option is the type of
www_header_fields
items. - It is a directory and contains header settings to be set.
- This option is the type of
- default: {}
- keys:
-
name
- description:
- This key contains the name of the header field.
- default: ""
- description:
-
value
- description:
- This key specifies the value of the header field.
- default: ""
- description:
-
always
- description:
- This option enables/disables the regardless addition of the header field.
- choices: [false, true]
- default: false
- description:
-
- description:
-
www_locations
- description:
- This option contains a list of configurations depending on a request URI.
- The item type is
_www_location
.
- default: []
- description:
-
_www_location
- description:
- This option is the item of the option
www_locations
. - It contains a dictionary wit the configurations depending on a request URI.
- This option is the item of the option
- keys:
-
path
- description:
- The
path
option contains the request URI. - A regular expression and wildcards may be included.
- Use the key
match
to specify the correct match condition.
- The
- default: ""
- description:
-
match
- This key specifies the compare condition for the request URI.
- The value can be:
- "=~" for a regular expression match
- "!~" for a regular expression not match
- "==" for a string equal match
- "!=" for a string equal not match
- "" for a sub path match
- default: ""
-
alias
- description:
- This option defines a replacement for the specified location.
- default: undefined
- description:
-
expires
- description:
- This option is a dictionary with setting for controlling the expiration of all content in caches.
- default: undefined
- keys:
-
startfrom
- description:
- This option specifies the start of the expiration time from time of user access (
access
) or time of file modification (modification
).
- This option specifies the start of the expiration time from time of user access (
- choices: ["access", "modification"]
- default: "access"
- description:
-
value
- description:
- This option contains the numerical value of the expiration time.
- default: 1
- description:
-
unit
- decription:
- This option specifies the time unit of the expiration time.
- choices: ["years", "months", "days", "hours", "minutes", "seconds"]
- default: "days"
- decription:
-
- description:
-
header_fields
- description:
- This option contains a list of header fields to be set.
- The item type is
_www_header_field
. - see
www_headers_fields
- default: undefined
- description:
-
permission_order
- description:
- This option specifies the order of permission evalution.
- The value "allow-deny" means that all allow permissions a are evaluated first.
- The value "deny-allow" means that all deny permissions a are evaluated first.
- choices: ["allow-deny", "deny-allow"]
- default: "deny-allow"
- description:
-
permissions
- description:
- This key contains a list of access permissions.
- The items are from type
_permission
.
- default: []
- description:
-
_permission
- description:
- This key is the type of the items of the
permissions
key. - It contains a dictionary with the permission settings.
- This key is the type of the items of the
- default: {}
- keys:
-
host
- description:
- The host key speficies the host name, IP address or network to which the rule is to be applied.
- A special value is
all
that applies the rule to all connections.
- default: "all"
- description:
-
permission
- description:
- This key specifies the permission thab is to be applied.
- choices: ["allow", "deny"]
- default: "deny"
- description:
-
- description:
-
fastcgi
- description:
- This option is a dictionary and contains the settings for FastCGI.
- default: undefined
- keys:
-
enabled
- description:
- This option enables/disables FastCGI.
- choices: [false, true]
- default: false
- description:
-
backend
- description:
- This option specifies the backend of FastCGI.
- Currently only PHP is supported.
- default: "php"
- description:
-
remove_headers
- description:
- This option contains a list of headers that to be removed from FastCGI response.
- default: []
- description:
-
pass
- description:
- This option specifies the IP address or socket for FastCGI to pass.
-
default: ""
-
params
- description:
- This option contains a list of
_param
.
- This option contains a list of
- default: []
- description:
-
_param
- description:
- This option is the item type of the
params
option. - It is a dictionary with the settings for FastCGI
- This option is the item type of the
- default: {}
- keys:
-
name
- description:
- This option contains the name of parameter.
- default: ""
- description:
-
value
- description:
- This option contains the value of the parameter.
- default: ""
- description:
-
- description:
-
- description:
-
- description:
Processes
main
- install www software
- create www group
- create www user
- install PHP if it is used
configure
- create and configure www directory
- configure PHP if it is used
- configure SSL if www_ssl_priv_key and www_ssl_cert or www_ssl_selfsigned are set
- configure web server
License
BSD-3-Clause
Contributors
- Martin Pietsch (martin.pietsch@tu-dresden.de)
- Reimar Unger (reimar.unger@tu-dresden.de)