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,2 @@
*.retry
tests/test.sh

View file

@ -0,0 +1,27 @@
---
services: docker
env:
- distro: centos7
- distro: ubuntu1604
script:
# Configure test script so we can run extra tests after playbook is run.
- export container_id=$(date +%s)
- export cleanup=false
# Download test shim.
- wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/
- chmod +x ${PWD}/tests/test.sh
# Run tests.
- ${PWD}/tests/test.sh
# Make sure Pecl is installed.
- >
sudo docker exec ${container_id} which pecl
&& (echo 'Pecl is installed' && exit 0)
|| (echo 'Pecl is not installed' && exit 1)
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

View file

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2017 Jeff Geerling
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -0,0 +1,57 @@
# Ansible Role: PHP PECL extensions
[![Build Status](https://travis-ci.org/geerlingguy/ansible-role-php-pecl.svg?branch=master)](https://travis-ci.org/geerlingguy/ansible-role-php-pecl)
Installs PHP PECL extensions (and optionally `pecl` itself) on servers with PHP already installed.
## Requirements
PHP must already be installed on the server. This role works great with and is tested alongside `geerlingguy.php`.
Also, if you don't already have `php-pear` (RedHat) or `php-pecl` (Debian) installed, you should set `php_pecl_install_pecl: true` to force this role to install the proper package.
## Role Variables
Available variables are listed below, along with default values (see `defaults/main.yml`):
php_pecl_install_pecl: false
Whether to install `php-pecl` (Debian-based OSes) or `php-pear` (RedHat-based OSes).
php_pecl_install_command: "pecl install"
The command that will be run to install extensions. The default is generally correct, but if you're running Ubuntu 14.04 LTS and run into [this issue](https://github.com/geerlingguy/ansible-role-php-pecl/pull/7), you should override this default with `"pecl install -Z"`
php_pecl_extensions: []
A list of extensions that should be installed via `pecl install`. If you'd like to have this role install extensions like XDebug, just add it in the list, like so:
php_pecl_extensions:
- redis
- xdebug
## Dependencies
- geerlingguy.php
## Example Playbook
- hosts: webservers
vars_files:
- vars/main.yml
roles:
- geerlingguy.php-pecl
*Inside `vars/main.yml`*:
php_pecl_extensions:
- redis
- xdebug
## License
MIT / BSD
## Author Information
This role was created in 2014 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).

View file

@ -0,0 +1,8 @@
---
php_pecl_install_pecl: false
php_pecl_install_command: "pecl install"
# Add extensions to this list to have them installed with this role.
php_pecl_extensions: []
# - xdebug

View file

@ -0,0 +1,44 @@
---
dependencies:
- geerlingguy.php
galaxy_info:
author: geerlingguy
description: PHP PECL extension installation.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 1.9
platforms:
- name: EL
versions:
- all
- name: GenericUNIX
versions:
- all
- name: Fedora
versions:
- all
- name: opensuse
versions:
- all
- name: GenericBSD
versions:
- all
- name: FreeBSD
versions:
- all
- name: Ubuntu
versions:
- all
- name: SLES
versions:
- all
- name: GenericLinux
versions:
- all
- name: Debian
versions:
- all
galaxy_tags:
- development
- web

View file

@ -0,0 +1,16 @@
---
- name: Include OS-Specific variables.
include_vars: "{{ ansible_os_family }}.yml"
- name: Ensure pecl is installed (if configured).
package:
name: "{{ php_pecl_package }}"
state: present
when: php_pecl_install_pecl
- name: Install PECL libaries.
shell: "yes '' | {{ php_pecl_install_command }} {{ item }}"
register: pecl_result
changed_when: "pecl_result.rc == 0"
failed_when: "not (('already installed' in pecl_result.stdout) or ('install ok:' in pecl_result.stdout))"
with_items: "{{ php_pecl_extensions }}"

View file

@ -0,0 +1,11 @@
# Ansible Role tests
To run the test playbook(s) in this directory:
1. Install and start Docker.
1. Download the test shim (see .travis.yml file for the URL) into `tests/test.sh`:
- `wget -O tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/`
1. Make the test shim executable: `chmod +x tests/test.sh`.
1. Run (from the role root directory) `distro=[distro] playbook=[playbook] ./tests/test.sh`
If you don't want the container to be automatically deleted after the test playbook is run, add the following environment variables: `cleanup=false container_id=$(date +%s)`

View file

@ -0,0 +1,3 @@
---
- src: geerlingguy.repo-remi
- src: geerlingguy.php

View file

@ -0,0 +1,27 @@
---
- hosts: all
vars:
php_enable_webserver: false
php_enablerepo: "remi,remi-php70"
php_pecl_extensions:
- redis
pre_tasks:
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=600
when: ansible_os_family == 'Debian'
- name: Install development tools (Debian).
apt: name=build-essential state=present
when: ansible_os_family == 'Debian'
- name: Install development tools (RedHat).
yum: name="@Development tools" state=present
when: ansible_os_family == 'RedHat'
roles:
- role: geerlingguy.repo-remi
when: ansible_os_family == 'RedHat'
- geerlingguy.php
- role_under_test

View file

@ -0,0 +1,2 @@
---
php_pecl_package: php-pecl

View file

@ -0,0 +1,2 @@
---
php_pecl_package: php-pear