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,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,2 @@
---
- src: geerlingguy.java

View file

@ -0,0 +1,11 @@
---
- hosts: all
vars:
solr_version: "3.6.2"
java_packages:
- openjdk-7-jdk
roles:
- geerlingguy.java
- role_under_test

View file

@ -0,0 +1,11 @@
---
- hosts: all
vars:
solr_version: "4.10.4"
java_packages:
- openjdk-7-jdk
roles:
- geerlingguy.java
- role_under_test

View file

@ -0,0 +1,20 @@
---
- hosts: all
vars:
solr_version: "5.5.3"
solr_remove_cruft: true
java_packages:
- openjdk-7-jdk
pre_tasks:
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=600
when: ansible_os_family == "Debian"
- name: Ensure sudo is present.
package: name=sudo state=present
roles:
- geerlingguy.java
- role_under_test

View file

@ -0,0 +1,47 @@
---
- hosts: all
pre_tasks:
- name: Set Java 8 package for RedHat.
set_fact:
java_packages:
- java-1.8.0-openjdk
when: ansible_os_family == "RedHat"
- name: Set Java 8 package for Debian/Ubuntu.
set_fact:
java_packages:
- openjdk-8-jdk
when: >
ansible_distribution == "Debian" or
(ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04")
- name: Add repository for OpenJDK 8 (Ubuntu 14.04).
apt_repository: repo='ppa:openjdk-r/ppa'
when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04"
- name: Enable Backports repository (Debian).
apt_repository:
repo: 'deb http://ftp.debian.org/debian {{ ansible_distribution_release }}-backports main'
state: present
filename: "{{ ansible_distribution_release }}_backports"
register: debian_backports
when: ansible_distribution == "Debian"
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=600
when: ansible_os_family == "Debian"
# See: http://unix.stackexchange.com/a/342469
- name: Install dependencies (Debian).
apt:
default_release: "{{ ansible_distribution_release }}-backports"
name:
- openjdk-8-jre-headless
- ca-certificates-java
state: present
when: ansible_distribution == "Debian"
roles:
- geerlingguy.java
- role_under_test