Skip to content

Instantly share code, notes, and snippets.

@davialexandre
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davialexandre/bcd439770a628fe3b1bc to your computer and use it in GitHub Desktop.
Save davialexandre/bcd439770a628fe3b1bc to your computer and use it in GitHub Desktop.
tasks to install webgrind using Ansible
- name: PHP | Create the webgrind dirs
file: name=/var/www/webgrind/storage state=directory owner=www-data mode=0700
- name: PHP | Download webgrind package
get_url: url=https://github.com/bionoren/webgrind/archive/xdebug23.zip dest=/tmp/webgrind.tar.gz
- name: PHP | Extract the webgrind package
unarchive: src=/tmp/webgrind.tar.gz dest=/var/www/webgrind copy=no creates=/var/www/webgrind/index.php
- name: PHP | Move the webgrind package contents to the webgrind dir
shell: mv /var/www/webgrind/webgrind-master/* /var/www/webgrind creates=/var/www/webgrind/index.php
- name: PHP | Remove the webgrind-master dir
file: path=/var/www/webgrind/webgrind-master state=absent
- name: PHP | Copy the webgrind vhost file
copy:
src=files/nginx/webgrind.conf
dest=/etc/nginx/conf.d/webgrind.conf
notify:
- Restart NGINX
server {
listen 9998;
root /var/www/webgrind;
index index.php;
location ~ \.php(/|$) {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
location config.php {
return 404;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment