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
48
box/provisioning/roles/geerlingguy.repo-remi/.travis.yml
Normal file
48
box/provisioning/roles/geerlingguy.repo-remi/.travis.yml
Normal file
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
sudo: required
|
||||
|
||||
env:
|
||||
- distribution: centos
|
||||
version: 6
|
||||
init: /sbin/init
|
||||
run_opts: ""
|
||||
- distribution: centos
|
||||
version: 7
|
||||
init: /usr/lib/systemd/systemd
|
||||
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
before_install:
|
||||
# Pull container
|
||||
- 'sudo docker pull ${distribution}:${version}'
|
||||
# Customize container
|
||||
- 'sudo docker build --rm=true --file=tests/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests'
|
||||
|
||||
script:
|
||||
- container_id=$(mktemp)
|
||||
# Run container in detached state
|
||||
- 'sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} ${distribution}-${version}:ansible "${init}" > "${container_id}"'
|
||||
|
||||
# Install dependencies.
|
||||
- 'sudo docker exec "$(cat ${container_id})" ansible-galaxy install -r /etc/ansible/roles/role_under_test/tests/requirements.yml'
|
||||
|
||||
# Ansible syntax check.
|
||||
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/test.yml --syntax-check'
|
||||
|
||||
# Test role.
|
||||
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/test.yml'
|
||||
|
||||
# Test role idempotence.
|
||||
- >
|
||||
sudo docker exec "$(cat ${container_id})" ansible-playbook /etc/ansible/roles/role_under_test/tests/test.yml
|
||||
| grep -q 'changed=0.*failed=0'
|
||||
&& (echo 'Idempotence test: pass' && exit 0)
|
||||
|| (echo 'Idempotence test: fail' && exit 1)
|
||||
|
||||
# Clean up
|
||||
- 'sudo docker stop "$(cat ${container_id})"'
|
||||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
39
box/provisioning/roles/geerlingguy.repo-remi/README.md
Normal file
39
box/provisioning/roles/geerlingguy.repo-remi/README.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Ansible Role: Remi Repository
|
||||
|
||||
[](https://travis-ci.org/geerlingguy/ansible-role-repo-remi)
|
||||
|
||||
Installs [Remi's RPM repository](http://rpms.famillecollet.com/) for RHEL/CentOS.
|
||||
|
||||
## Requirements
|
||||
|
||||
None.
|
||||
|
||||
## Role Variables
|
||||
|
||||
Available variables are listed below, along with default values (see `defaults/main.yml`):
|
||||
|
||||
remi_repo_url: "http://rpms.famillecollet.com/enterprise/remi-release-{{ ansible_distribution_major_version }}.rpm"
|
||||
|
||||
The URL from which the Remi repo `.rpm` will be downloaded and installed.
|
||||
|
||||
remi_repo_gpg_key_url: "http://rpms.remirepo.net/RPM-GPG-KEY-remi"
|
||||
|
||||
Remi repo GPG key location. Can be set to a local file or to the URL from Remi's website.
|
||||
|
||||
## Dependencies
|
||||
|
||||
None.
|
||||
|
||||
## Example Playbook
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- geerlingguy.repo-remi
|
||||
|
||||
## License
|
||||
|
||||
MIT / BSD
|
||||
|
||||
## Author Information
|
||||
|
||||
This role was created in 2014 by [Jeff Geerling](http://jeffgeerling.com/), author of [Ansible for DevOps](http://ansiblefordevops.com/).
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
remi_repo_url: "http://rpms.remirepo.net/enterprise/remi-release-{{ ansible_distribution_major_version }}.rpm"
|
||||
remi_repo_gpg_key_url: "http://rpms.remirepo.net/RPM-GPG-KEY-remi"
|
15
box/provisioning/roles/geerlingguy.repo-remi/meta/main.yml
Normal file
15
box/provisioning/roles/geerlingguy.repo-remi/meta/main.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
dependencies: []
|
||||
|
||||
galaxy_info:
|
||||
author: geerlingguy
|
||||
description: Remi's RPM repository for RHEL/CentOS.
|
||||
company: "Midwestern Mac, LLC"
|
||||
license: "license (BSD, MIT)"
|
||||
min_ansible_version: 1.8
|
||||
platforms:
|
||||
- name: EL
|
||||
versions:
|
||||
- all
|
||||
galaxy_tags:
|
||||
- packaging
|
10
box/provisioning/roles/geerlingguy.repo-remi/tasks/main.yml
Normal file
10
box/provisioning/roles/geerlingguy.repo-remi/tasks/main.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
- name: Install remi repo.
|
||||
yum:
|
||||
name: "{{ remi_repo_url }}"
|
||||
state: present
|
||||
|
||||
- name: Import remi GPG key.
|
||||
rpm_key:
|
||||
key: "{{ remi_repo_gpg_key_url }}"
|
||||
state: present
|
|
@ -0,0 +1,19 @@
|
|||
FROM centos:6
|
||||
|
||||
# Install Ansible
|
||||
RUN yum -y update; yum clean all;
|
||||
RUN yum -y install epel-release
|
||||
RUN yum -y install git python-setuptools gcc sudo libffi-devel python-devel openssl-devel
|
||||
RUN yum clean all
|
||||
RUN easy_install pip
|
||||
RUN pip install ansible
|
||||
|
||||
|
||||
# Disable requiretty
|
||||
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
|
||||
|
||||
# Install Ansible inventory file
|
||||
RUN mkdir - p /etc/ansible
|
||||
RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
|
||||
|
||||
CMD ["/usr/sbin/init"]
|
|
@ -0,0 +1,29 @@
|
|||
FROM centos:7
|
||||
|
||||
# Install systemd -- See https://hub.docker.com/_/centos/
|
||||
RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs
|
||||
RUN yum -y update; yum clean all; \
|
||||
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||
rm -f /lib/systemd/system/multi-user.target.wants/*; \
|
||||
rm -f /etc/systemd/system/*.wants/*; \
|
||||
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||
rm -f /lib/systemd/system/basic.target.wants/*; \
|
||||
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||
|
||||
# Install Ansible
|
||||
RUN yum -y install git python-setuptools gcc sudo libffi-devel python-devel openssl-devel
|
||||
RUN yum clean all
|
||||
RUN easy_install pip
|
||||
RUN pip install ansible
|
||||
|
||||
# Disable requiretty
|
||||
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
|
||||
|
||||
# Install Ansible inventory file
|
||||
RUN mkdir - p /etc/ansible
|
||||
RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
|
||||
|
||||
VOLUME ["/sys/fs/cgroup"]
|
||||
CMD ["/usr/sbin/init"]
|
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
- src: geerlingguy.repo-remi
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- hosts: all
|
||||
|
||||
roles:
|
||||
- role_under_test
|
Loading…
Add table
Add a link
Reference in a new issue