Skip to content
Snippets Groups Projects

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
  • www_config_dest_file

    • description:
      • This option specifies the destination path of the configuration file.
    • default: undefined
  • www_pid_file

    • description:
      • This option defines the path to the PID file.
    • default: undefined
  • www_root_directory

    • description:
      • path to the root directory of the web service
    • default: /var/www
  • www_default_mimetype

    • description:
      • This option specifies the default MIME type
    • default: "text/plain"
  • www_mimetypes

    • descriptions:
      • list of known mimetypes
    • default: []
  • www_default_charset

    • description:
      • This options specifies the default charset.
    • default: "utf-8"
  • www_list_directory

    • description:
      • enables the listing of a directory
    • default: false
  • www_index_files

    • description:
      • list of index files
    • default: ["index.html"]
  • www_user

    • description:
      • The username for the www directory and the service.
    • default: www
  • www_group

    • description:
      • The groupname for the www directory and the service.
    • default: www
  • www_servername

    • description:
      • The default name of der www hostname.
    • default: "{{ inventory_hostname }}"
  • www_servertoken_enabled

    • description:
      • This option enables/disables the server token of a web service.
    • choices: [false, true]
    • default: false
  • www_ssl_priv_key

    • description:
      • The SSL private key for the service.
    • default: ""
  • www_ssl_cert

    • description:
      • The SSL certificate for the service.
    • default: ""
  • www_ssl_ca_cert

    • description:
      • The SSL CA certificate for the service.
    • default: ""
  • 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
  • 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) }}"
  • 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) }}"
  • www_listen

    • description:
      • This option is a list of listening settings _www_listen.
    • default: [{"port": 80}]
  • _www_listen

    • description:

      • This option is a item of www_listen and contains a dictionary with the default listening settings.
    • keys:

      • port
        • description:
          • This option contains the TCP port.
        • default: 80
    • address

      • description:
        • This option contains the IP address for binding.
      • default: ""
    • use_ssl

      • description:
        • This option enables/disables SSL for TLS connection
      • choices: [false, true]
      • default: false
    • redirect_to_ssl

      • description:
        • This option specifies if a connection is redirected to a SSL port.
      • choices: [false, true]
      • default: false
  • www_log_files_path

    • description:
      • The standard log-file directory
    • default: "/var/log"
  • www_error_file

    • description:
      • This option specifies the path to the global error log file.
    • default: "error.log"
  • www_modules

    • description:
      • This option contains a list of modules, which should be loaded.
    • default: []
  • www_error_level

    • description:
      • This option specifies the standard error level.
    • default: "warn"
  • www_error_documents

    • description:
      • This option is a list of _www_error_document
    • default: []
  • _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
      • page

        • description:
          • This key specifies the path to the corresponting error page.
          • It can be also a simple string.
        • default: undefined
  • www_sendfile

    • description:
      • This option enables/disables the sendfile support of the kernels to send file to a client.
    • choices: [false, true]
    • default: true
  • www_http2_enabled

    • description:
      • This option enables/disables the HTTP/2 support.
    • choices: [false, true]
    • default: false
  • www_header_fields

    • description:
      • This option contains a list of header fields to be set.
      • The item type is _www_header_field.
    • default: []
  • _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.
    • default: {}
    • keys:
      • name

        • description:
          • This key contains the name of the header field.
        • default: ""
      • value

        • description:
          • This key specifies the value of the header field.
        • default: ""
      • always

        • description:
          • This option enables/disables the regardless addition of the header field.
        • choices: [false, true]
        • default: false
  • www_locations

    • description:
      • This option contains a list of configurations depending on a request URI.
      • The item type is _www_location.
    • default: []
  • _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.
    • 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.
        • default: ""
      • 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
      • 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).
            • choices: ["access", "modification"]
            • default: "access"
          • value

            • description:
              • This option contains the numerical value of the expiration time.
            • default: 1
          • unit

            • decription:
              • This option specifies the time unit of the expiration time.
            • choices: ["years", "months", "days", "hours", "minutes", "seconds"]
            • default: "days"
      • 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
      • 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"
      • permissions

        • description:
          • This key contains a list of access permissions.
          • The items are from type _permission.
        • default: []
      • _permission

        • description:
          • This key is the type of the items of the permissions key.
          • It contains a dictionary with the permission settings.
        • 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"
          • permission

            • description:
              • This key specifies the permission thab is to be applied.
            • choices: ["allow", "deny"]
            • default: "deny"
      • 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
          • backend

            • description:
              • This option specifies the backend of FastCGI.
              • Currently only PHP is supported.
            • default: "php"
          • remove_headers

            • description:
              • This option contains a list of headers that to be removed from FastCGI response.
            • default: []
          • pass

            • description:
            • This option specifies the IP address or socket for FastCGI to pass.
          • default: ""

          • params

            • description:
              • This option contains a list of _param.
            • default: []
          • _param

            • description:
              • This option is the item type of the params option.
              • It is a dictionary with the settings for FastCGI
            • default: {}
            • keys:
              • name

                • description:
                  • This option contains the name of parameter.
                • default: ""
              • value

                • description:
                  • This option contains the value of the parameter.
                • default: ""

Processes

main

  1. install www software
  2. create www group
  3. create www user
  4. install PHP if it is used

configure

  1. create and configure www directory
  2. configure PHP if it is used
  3. configure SSL if www_ssl_priv_key and www_ssl_cert or www_ssl_selfsigned are set
  4. configure web server

License

BSD-3-Clause

Contributors