Add all files needed to bring up VM and run agaric.com locally

This commit is contained in:
benjamin melançon 2018-08-20 10:45:20 -04:00
parent 52c8b60bac
commit 4d2bc0ee24
742 changed files with 24037 additions and 0 deletions

View file

@ -0,0 +1,18 @@
---
- name: Ensure PHP configuration directories exist.
file:
path: "{{ item }}"
state: directory
mode: 0755
follow: true
with_items: "{{ php_extension_conf_paths }}"
- name: Copy XHProf INI into various other conf folders.
template:
src: xhprof.ini.j2
dest: "{{ item }}/{{ php_xhprof_config_filename }}"
owner: root
group: root
mode: 0644
with_items: "{{ php_extension_conf_paths }}"
notify: restart webserver

View file

@ -0,0 +1,72 @@
---
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"
- name: Define php_xhprof_module_path.
set_fact:
php_xhprof_module_path: "{{ __php_xhprof_module_path }}"
when: php_xhprof_module_path is not defined
- name: Define php_xhprof_config_filename.
set_fact:
php_xhprof_config_filename: "{{ __php_xhprof_config_filename }}"
when: php_xhprof_config_filename is not defined
# Setup/install tasks.
- name: Ensure dependencies for installing XHProf are present.
package: "name={{ item }} state=installed"
with_items:
- make
- gcc
- unzip
- graphviz
- name: Download and untar XHProf.
unarchive:
src: "{{ xhprof_download_url }}"
dest: "{{ workspace }}"
copy: no
creates: "{{ workspace }}/{{ xhprof_download_folder_name }}"
- name: Build XHProf.
shell: >
{{ item }}
chdir={{ workspace }}/{{ xhprof_download_folder_name }}/extension
creates={{ workspace }}/{{ xhprof_download_folder_name }}/extension/modules/xhprof.so
with_items:
- phpize
- ./configure
- make
notify: restart webserver
- name: Ensure XHProf module path exists.
file:
path: "{{ php_xhprof_module_path }}"
state: directory
owner: root
group: root
mode: 0755
- name: Move XHProf module into place.
shell: >
cp {{ workspace }}/{{ xhprof_download_folder_name }}/extension/modules/xhprof.so {{ php_xhprof_module_path }}/xhprof.so
creates={{ php_xhprof_module_path }}/xhprof.so
notify: restart webserver
- name: Move XHProf PHP library into place.
shell: >
cp -r {{ workspace }}/{{ xhprof_download_folder_name }}/xhprof_lib {{ php_xhprof_lib_dir }}
creates={{ php_xhprof_lib_dir }}/utils/xhprof_lib.php
- name: Move XHProf UI into place.
shell: >
cp -r {{ workspace }}/{{ xhprof_download_folder_name }}/xhprof_html {{ php_xhprof_html_dir }}
creates={{ php_xhprof_html_dir }}/index.php
- include: configure.yml
- name: Ensure XHProf output directory exists.
file:
path: "{{ xhprof_output_dir }}"
state: directory
mode: 0777