Installs xhgui: A graphical interface for XHProf data built on MongoDB.
Available variables are listed below, along with default values (see defaults/main.yml
):
xhgui_composer_path: /usr/local/bin/composer
The path where composer will be installed and available to your system. It is where the xhgui library will be downloaded. Note that you will have to point your vhost to: {{ xhgui_composer_path }}/vendor/perftools/xhgui/webroot
.
Ansible roles:
- hosts: servers
vars_files:
- vars/main.yml
roles:
- { role: geerlingguy.apache }
- { role: andreiashu.xhprof }
Inside vars/main.yml
:
apache_listen_port: 80
apache_vhosts:
# setup the xhgui vhost
- {servername: "xhgui.localdev.com", documentroot: "/usr/local/composer/vendor/perftools/xhgui/webroot"}
# example of vhost that enables xhprof profiling
- {
servername: "myapp.localdev.com",
documentroot: "/var/www/myapp/docroot",
extra_parameters: "php_admin_value auto_prepend_file \"/usr/local/composer/vendor/perftools/xhgui/external/header.php\""
}
MIT / BSD
Thanks to Rob Allen, Jeff Geerling and Kevin ARBOUIN for their work in this space which helped me create this role.
This role was created by Andrei Simion.