Add all files needed to bring up VM and run agaric.com locally
This commit is contained in:
parent
52c8b60bac
commit
4d2bc0ee24
742 changed files with 24037 additions and 0 deletions
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
- name: Include OS-specific variables.
|
||||
include_vars: "{{ item }}"
|
||||
with_fileglob:
|
||||
- "../vars/{{ ansible_os_family }}.yml"
|
||||
- "../vars/{{ ansible_os_family }}-php{{ php_version }}.yml"
|
||||
|
||||
- name: Define PHP variables.
|
||||
set_fact: "{{ item.key }}={{ hostvars[inventory_hostname][item.value] }}"
|
||||
when:
|
||||
- hostvars[inventory_hostname][item.key] is undefined
|
||||
- hostvars[inventory_hostname][item.value] is defined
|
||||
with_dict:
|
||||
php_conf_paths: __php_conf_paths
|
||||
php_extension_conf_paths: __php_extension_conf_paths
|
||||
php_fpm_daemon: __php_fpm_daemon
|
||||
php_fpm_conf_path: __php_fpm_conf_path
|
||||
php_fpm_pool_conf_path: __php_fpm_pool_conf_path
|
||||
php_mysql_package: __php_mysql_package
|
||||
php_redis_package: __php_redis_package
|
||||
php_memcached_package: __php_memcached_package
|
||||
php_pgsql_package: __php_pgsql_package
|
||||
php_tideways_module_path: __php_tideways_module_path
|
||||
php_uploadprogress_module_path: __php_uploadprogress_module_path
|
||||
php_xdebug_module_path: __php_xdebug_module_path
|
||||
php_xhprof_module_path: __php_xhprof_module_path
|
||||
php_packages: __php_packages
|
||||
|
||||
# Setup tasks.
|
||||
- include: "setup-{{ ansible_os_family }}.yml"
|
||||
static: no
|
||||
|
||||
- name: Set the correct XHProf package when PHP 5.6 is used.
|
||||
set_fact:
|
||||
xhprof_download_url: https://github.com/phacility/xhprof/archive/master.tar.gz
|
||||
xhprof_download_folder_name: xhprof-master
|
||||
when: php_version == '5.6'
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
- name: Set the correct opcache filename (Ubuntu/Debian).
|
||||
set_fact:
|
||||
php_opcache_conf_filename: "10-opcache.ini"
|
||||
|
||||
- name: Add repository for PHP versions (Ubuntu).
|
||||
apt_repository: repo='ppa:ondrej/php'
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: Add repository for PHP 5 compatibility packages (Ubuntu).
|
||||
apt_repository: repo='ppa:ondrej/php5-compat'
|
||||
when: php_version == "5.6" and ansible_distribution == "Ubuntu"
|
||||
|
||||
# Debian-specific tasks.
|
||||
- name: Add dependencies for PHP versions (Debian).
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
with_items:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
when: ansible_distribution == "Debian"
|
||||
|
||||
- name: Add Ondrej Sury's apt key (Debian).
|
||||
apt_key:
|
||||
url: https://packages.sury.org/php/apt.gpg
|
||||
state: present
|
||||
when: ansible_distribution == "Debian"
|
||||
|
||||
- name: Add Ondrej Sury's repo (Debian).
|
||||
apt_repository:
|
||||
repo: "deb https://packages.sury.org/php/ {{ ansible_distribution_release }} main"
|
||||
state: present
|
||||
register: php_ondrej_debian_repo
|
||||
when: ansible_distribution == "Debian"
|
||||
|
||||
- name: Update apt caches after repo is added (Debian).
|
||||
apt: update_cache=yes
|
||||
when: php_ondrej_debian_repo.changed and (ansible_distribution == "Debian")
|
||||
|
||||
# PHP package purges.
|
||||
- name: Purge PHP version packages.
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
purge: yes
|
||||
force: yes
|
||||
when: "'php' + php_version not in item"
|
||||
with_items:
|
||||
- php5.6-common
|
||||
- php7.0-common
|
||||
- php7.1-common
|
||||
- php7.2-common
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
- name: Enable remi repo for PHP 5.6.
|
||||
set_fact: php_enablerepo="remi,remi-php56"
|
||||
when: php_version == "5.6"
|
||||
|
||||
- name: Enable remi repo for PHP 7.0.
|
||||
set_fact: php_enablerepo="remi,remi-php70"
|
||||
when: php_version == "7.0"
|
||||
|
||||
- name: Enable remi repo for PHP 7.1.
|
||||
set_fact: php_enablerepo="remi,remi-php71"
|
||||
when: php_version == "7.1"
|
||||
|
||||
- name: Enable remi repo for PHP 7.2.
|
||||
set_fact: php_enablerepo="remi,remi-php72"
|
||||
when: php_version == "7.2"
|
Loading…
Add table
Add a link
Reference in a new issue