-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d95cccf
commit 11c3655
Showing
10 changed files
with
152 additions
and
26 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Molecule managed | ||
|
||
{% if item.registry is defined %} | ||
FROM {{ item.registry.url }}/{{ item.image }} | ||
{% else %} | ||
FROM {{ item.image }} | ||
{% endif %} | ||
|
||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ | ||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all; \ | ||
elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ | ||
elif [ $(command -v zypper) ]; then zypper refresh && zypper update -y && zypper install -y python sudo bash python-xml && zypper clean -a; \ | ||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ | ||
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
******* | ||
Docker driver installation guide | ||
******* | ||
|
||
Requirements | ||
============ | ||
|
||
* General molecule dependencies (see https://molecule.readthedocs.io/en/latest/installation.html) | ||
* Docker Engine | ||
* docker-py | ||
* docker | ||
|
||
Install | ||
======= | ||
|
||
Ansible < 2.6 | ||
|
||
.. code-block:: bash | ||
$ sudo pip install docker-py | ||
Ansible >= 2.6 | ||
|
||
.. code-block:: bash | ||
$ sudo pip install docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
# Standards: 0.2 | ||
dependency: | ||
name: galaxy | ||
requirements_file: requirements.yml | ||
driver: | ||
name: docker | ||
lint: | ||
name: yamllint | ||
platforms: | ||
- name: base-maven-centos | ||
image: milcom/centos7-systemd | ||
privileged: True | ||
- name: base-maven-ubuntu | ||
image: ubuntu | ||
privileged: True | ||
provisioner: | ||
name: ansible | ||
config_options: | ||
defaults: | ||
remote_tmp: /tmp | ||
playbooks: | ||
converge: playbook.yml | ||
lint: | ||
name: ansible-lint | ||
scenario: | ||
name: default |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
- src: https://github.com/dockpack/base_common.git | ||
name: dockpack.base_common | ||
|
||
- src: https://github.com/dockpack/base_java8.git | ||
name: dockpack.base_java8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Molecule managed | ||
|
||
--- | ||
file: | ||
/etc/hosts: | ||
exists: true | ||
owner: root | ||
group: root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
# This is an example playbook to execute goss tests. | ||
# Tests need distributed to the appropriate ansible host/groups | ||
# prior to execution by `goss validate`. | ||
|
||
- name: Verify | ||
hosts: all | ||
become: true | ||
vars: | ||
goss_version: v0.3.2 | ||
goss_arch: amd64 | ||
goss_dst: /usr/local/bin/goss | ||
goss_sha256sum: 2f6727375db2ea0f81bee36e2c5be78ab5ab8d5981f632f761b25e4003e190ec | ||
goss_url: "https://github.com/aelsabbahy/goss/releases/download/{{ goss_version }}/goss-linux-{{ goss_arch }}" | ||
goss_test_directory: /tmp | ||
goss_format: documentation | ||
tasks: | ||
- name: Download and install Goss | ||
get_url: | ||
url: "{{ goss_url }}" | ||
dest: "{{ goss_dst }}" | ||
sha256sum: "{{ goss_sha256sum }}" | ||
mode: 0755 | ||
register: download_goss | ||
until: download_goss is succeeded | ||
retries: 3 | ||
|
||
- name: Copy Goss tests to remote | ||
copy: | ||
src: "{{ item }}" | ||
dest: "{{ goss_test_directory }}/{{ item | basename }}" | ||
with_fileglob: | ||
- "{{ lookup('env', 'MOLECULE_VERIFIER_TEST_DIRECTORY') }}/test_*.yml" | ||
|
||
- name: Register test files | ||
shell: "ls {{ goss_test_directory }}/test_*.yml" | ||
register: test_files | ||
|
||
- name: Execute Goss tests | ||
command: "{{ goss_dst }} -g {{ item }} validate --format {{ goss_format }}" | ||
register: test_results | ||
with_items: "{{ test_files.stdout_lines }}" | ||
|
||
- name: Display details about the Goss results | ||
debug: | ||
msg: "{{ item.stdout_lines }}" | ||
with_items: "{{ test_results.results }}" | ||
|
||
- name: Fail when tests fail | ||
fail: | ||
msg: "Goss failed to validate" | ||
when: item.rc != 0 | ||
with_items: "{{ test_results.results }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# these python extensions are required for testing | ||
ansible==2.3.2 | ||
yamllint==1.8.1 | ||
ansible-lint==3.4.15 | ||
molecule==1.25.1 | ||
tox | ||
molecule | ||
docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[tox] | ||
minversion = 1.8 | ||
envlist = py{27}-ansible{24,25},molecule,yamllint | ||
skipsdist = true | ||
|
||
[testenv] | ||
# ansible only supports python3 in versions >= 2.5 | ||
basepython = python2.7 | ||
passenv = * | ||
deps = | ||
-rrequirements.txt | ||
ansible24: ansible>=2.4,<2.5 | ||
ansible25: ansible>=2.5,<2.6 | ||
commands = | ||
pip list | ||
molecule test |