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,36 @@
---
- name: Clone the PhpRedis repo.
git:
repo: "{{ php_redis_source_repo }}"
dest: "{{ php_redis_source_clone_dir }}"
version: "{{ php_redis_source_version }}"
accept_hostkey: yes
depth: 1
- name: Run phpize.
shell: >
phpize
chdir={{ php_redis_source_clone_dir }}
creates={{ php_extension_conf_paths[0] }}/redis.ini
- name: Run configure script.
shell: >
{{ php_redis_source_configure_command }}
chdir={{ php_redis_source_clone_dir }}
creates={{ php_extension_conf_paths[0] }}/redis.ini
- name: Make and install PHP.
shell: >
{{ item }}
chdir={{ php_redis_source_clone_dir }}
creates={{ php_extension_conf_paths[0] }}/redis.ini
with_items:
- make
- make install
- name: Ensure the Redis extension is present in PHP's configuration.
copy:
src: redis.ini
dest: "{{ php_extension_conf_paths[0] }}/redis.ini"
mode: 0644
notify: restart webserver

View file

@ -0,0 +1,31 @@
---
# Include variables and define needed variables.
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"
- name: Define php_redis_package.
set_fact:
php_redis_package: "{{ __php_redis_package }}"
when: php_redis_package is not defined
# Install PhpRedis from the system package manager.
- name: Install PhpRedis extension (RedHat).
yum:
name: "{{ php_redis_package }}"
state: installed
enablerepo: "{{ php_enablerepo }}"
notify:
- restart webserver
- restart php-fpm
when: (php_redis_install_from_source == false) and (ansible_os_family == 'RedHat')
- name: Install PhpRedis extension (Debian).
apt: "name={{ php_redis_package }} state=installed"
notify:
- restart webserver
- restart php-fpm
when: (php_redis_install_from_source == false) and (ansible_os_family == 'Debian')
# Install PhpRedis from source.
- include: install-from-source.yml
when: php_redis_install_from_source == true