Ansible Role for PHP VirtualHost Management.
This role require Ansible 2.0 or higher.
This role was designed for Ubuntu Server 14.04 LTS and Ubuntu Server 16.04 LTS.
parameter | required | default | choices | comments |
---|---|---|---|---|
php_vhosts_base | yes | {{ php_vhosts_home }} | VirtualHost base directory. | |
php_vhosts_date_timezone | yes | Etc/UTC | The default timezone used by all date/time functions. | |
php_vhosts_display_errors | yes | Off | This determines whether errors should be printed to the screen as part of the output or if they should be hidden from the user. | |
php_vhosts_display_startup_errors | yes | Off | Even when display_errors is on, errors that occur during PHP's startup sequence are not displayed. | |
php_vhosts_error_reporting | yes | E_ALL & ~E_DEPRECATED & ~E_STRICT | Set the error reporting level. | |
php_vhosts_gid | no | Specifying the GID for shared storage. NOTE: This value should only be set once before deploying and then never changed. | ||
php_vhosts_hash_salt | yes | Specific password hash salt for sha512. | ||
php_vhosts_home | yes | /home/{{ php_vhosts_user }} | Location for the virtual host user home directory. | |
php_vhosts_html_errors | yes | On | Turn off HTML tags in error messages. | |
php_vhosts_id | yes | Unique ID for virtual host shared among other services. | ||
php_vhosts_ignore_repeated_errors | yes | Off | Do not log repeated messages. | |
php_vhosts_ignore_repeated_source | yes | Off | Ignore source of message when ignoring repeated messages. | |
php_vhosts_log_errors | yes | On | Tells whether script error messages should be logged to the server's error log or error_log. | |
php_vhosts_max_execution_time | yes | 30 | This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. | |
php_vhosts_max_input_time | yes | 60 | This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET. | |
php_vhosts_memory_limit | yes | 256M | This sets the maximum amount of memory in bytes that a script is allowed to allocate. | |
php_vhosts_pass | yes | Password for virtual host user. | ||
php_vhosts_post_max_size | yes | 32M | Sets max size of post data allowed. | |
php_vhosts_report_memleaks | yes | On | If this parameter is set to On (the default), this parameter will show a report of memory leaks detected by the Zend memory manager. | |
php_vhosts_session_save_path | yes | {{ php_vhosts_base }}/tmp | Defines the argument which is passed to the save handler. | |
php_vhosts_short_open_tag | yes | Off | Tells PHP whether the short form (<? ?>) of PHP's open tag should be allowed. | |
php_vhosts_track_errors | yes | Off | If enabled, the last error message will always be present in the variable $php_errormsg. | |
php_vhosts_uid | no | Specifying the UID for shared storage. NOTE: This value should only be set once before deploying and then never changed. | ||
php_vhosts_upload_max_filesize | yes | 32M | The maximum size of an uploaded file. | |
php_vhosts_upload_tmp_dir | yes | {{ php_vhosts_base }}/tmp | The temporary directory used for storing files when doing file upload. | |
php_vhosts_user | yes | Username for virtual host user. |
No additional role dependencies.
- hosts: all
roles:
- role: hswong3i.php_vhosts
php_vhosts_hash_salt: "wi6Eereiwae7phae"
php_vhosts_id: "example"
php_vhosts_pass: "xaivoo9Z"
php_vhosts_user: "example"
- Wong Hoi Sing Edison