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
11
box/provisioning/roles/geerlingguy.drupal/tests/README.md
Normal file
11
box/provisioning/roles/geerlingguy.drupal/tests/README.md
Normal 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)`
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
ALIAS_CMD="$(echo ""$0"" | sed -e 's?/sbin/??')"
|
||||
|
||||
case "$ALIAS_CMD" in
|
||||
start|stop|restart|reload|status)
|
||||
exec service $1 $ALIAS_CMD
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$1" in
|
||||
list )
|
||||
exec service --status-all
|
||||
;;
|
||||
reload-configuration )
|
||||
exec service $2 restart
|
||||
;;
|
||||
start|stop|restart|reload|status)
|
||||
exec service $2 $1
|
||||
;;
|
||||
\?)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- src: geerlingguy.repo-remi
|
||||
- src: geerlingguy.repo-dotdeb
|
||||
- src: geerlingguy.apache
|
||||
- src: geerlingguy.apache-php-fpm
|
||||
- src: geerlingguy.nginx
|
||||
- src: geerlingguy.mysql
|
||||
- src: geerlingguy.postgresql
|
||||
- src: geerlingguy.php
|
||||
- src: geerlingguy.php-mysql
|
||||
- src: geerlingguy.php-pgsql
|
||||
- src: geerlingguy.git
|
||||
- src: geerlingguy.composer
|
||||
- src: geerlingguy.drush
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
- hosts: all
|
||||
|
||||
vars_files:
|
||||
- test-vars.yml
|
||||
|
||||
vars:
|
||||
# Deploy from the Drupal VM Prod example project.
|
||||
drupal_deploy: true
|
||||
drupal_deploy_repo: "https://github.com/geerlingguy/drupalvm-live.git"
|
||||
drupal_deploy_dir: /var/www/drupal
|
||||
drupal_domain: "prod.drupalvm.com"
|
||||
|
||||
# Disable Composer-based codebase setup.
|
||||
drupal_build_composer_project: false
|
||||
drupal_build_composer: false
|
||||
drupal_composer_dependencies: []
|
||||
|
||||
pre_tasks:
|
||||
- include: test-setup.yml
|
||||
|
||||
roles:
|
||||
- name: geerlingguy.repo-remi
|
||||
when: ansible_os_family == "RedHat"
|
||||
- role: geerlingguy.repo-dotdeb
|
||||
when: ansible_distribution == 'Debian'
|
||||
- geerlingguy.apache
|
||||
- geerlingguy.mysql
|
||||
- geerlingguy.php
|
||||
- geerlingguy.php-mysql
|
||||
- geerlingguy.git
|
||||
- geerlingguy.composer
|
||||
- geerlingguy.drush
|
||||
- role_under_test
|
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
- name: Update apt cache.
|
||||
apt: update_cache=yes cache_valid_time=86400
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Install dependencies.
|
||||
package: name={{ item }}
|
||||
with_items:
|
||||
- curl
|
||||
- unzip
|
||||
- sendmail
|
||||
|
||||
- name: Add repository for Apache 2.4.9+ (Ubuntu 14).
|
||||
apt_repository: repo='ppa:ondrej/apache2'
|
||||
when: ansible_distribution == "Ubuntu" and ansible_distribution_release == "trusty"
|
||||
|
||||
- name: Add repository for PHP 7.0 (Ubuntu).
|
||||
apt_repository: repo='ppa:ondrej/php'
|
||||
when: ansible_distribution == "Ubuntu" and ansible_distribution_version != "16.04"
|
||||
|
||||
- name: Set php_packages for PHP 7.0 Debian 8 install.
|
||||
set_fact:
|
||||
php_packages:
|
||||
- php7.0-common
|
||||
- php7.0-cli
|
||||
- php7.0-dev
|
||||
- php7.0-fpm
|
||||
- libpcre3-dev
|
||||
- php7.0-opcache
|
||||
- php7.0-apcu
|
||||
- php7.0-xml
|
||||
- php7.0-zip
|
||||
- php7.0-mbstring
|
||||
- php7.0-json
|
||||
- php7.0-gd
|
||||
when: ansible_distribution == 'Debian'
|
||||
|
||||
- name: Copy initctl_faker into place for Ubuntu 14.04.
|
||||
copy:
|
||||
src: initctl_faker
|
||||
dest: /sbin/initctl
|
||||
mode: 0755
|
||||
force: yes
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '14.04'
|
||||
changed_when: false
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
php_enable_webserver: false
|
||||
php_enablerepo: "remi,remi-php71"
|
||||
php_enable_php_fpm: true
|
||||
php_fpm_listen: "127.0.0.1:9000"
|
||||
|
||||
apache_mods_enabled:
|
||||
- expires.load
|
||||
- ssl.load
|
||||
- rewrite.load
|
||||
- proxy.load
|
||||
- proxy_fcgi.load
|
||||
apache_remove_default_vhost: true
|
||||
apache_vhosts:
|
||||
- servername: "{{ drupal_domain }}"
|
||||
serveralias: "www.{{ drupal_domain }}"
|
||||
documentroot: "{{ drupal_core_path }}"
|
||||
extra_parameters: |
|
||||
<FilesMatch \.php$>
|
||||
SetHandler "proxy:fcgi://{{ php_fpm_listen }}"
|
||||
</FilesMatch>
|
||||
|
||||
mysql_enablerepo: "remi"
|
||||
mysql_databases:
|
||||
- name: "{{ drupal_db_name }}"
|
||||
encoding: utf8mb4
|
||||
collation: utf8mb4_general_ci
|
||||
mysql_users:
|
||||
- name: "{{ drupal_db_user }}"
|
||||
host: "%"
|
||||
password: "{{ drupal_db_password }}"
|
||||
priv: "{{ drupal_db_name }}.*:ALL"
|
21
box/provisioning/roles/geerlingguy.drupal/tests/test.yml
Normal file
21
box/provisioning/roles/geerlingguy.drupal/tests/test.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
- hosts: all
|
||||
|
||||
vars_files:
|
||||
- test-vars.yml
|
||||
|
||||
pre_tasks:
|
||||
- include: test-setup.yml
|
||||
|
||||
roles:
|
||||
- name: geerlingguy.repo-remi
|
||||
when: ansible_os_family == "RedHat"
|
||||
- role: geerlingguy.repo-dotdeb
|
||||
when: ansible_distribution == 'Debian'
|
||||
- geerlingguy.apache
|
||||
- geerlingguy.mysql
|
||||
- geerlingguy.php
|
||||
- geerlingguy.php-mysql
|
||||
- geerlingguy.git
|
||||
- geerlingguy.composer
|
||||
- role_under_test
|
Loading…
Add table
Add a link
Reference in a new issue