Skip to content

Commit e4a6f62

Browse files
authored
Merge pull request #15 from fapdash/add_molecule_test
Add molecule test
2 parents 28e2ea6 + d0f4259 commit e4a6f62

11 files changed

Lines changed: 100 additions & 6 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.log

.yamllint

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
extends: default
2+
3+
rules:
4+
braces:
5+
max-spaces-inside: 1
6+
level: error
7+
brackets:
8+
max-spaces-inside: 1
9+
level: error
10+
line-length: disable
11+
# NOTE(retr0h): Templates no longer fail this lint rule.
12+
# Uncomment if running old Molecule templates.
13+
# truthy: disable

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
letsencrypt_staging: no
2+
letsencrypt_staging: false

meta/main.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
galaxy_info:
23
author: coopdevs
34
description: free software for Social and Solidarity Economy
@@ -8,11 +9,11 @@ galaxy_info:
89
min_ansible_version: 1.2
910

1011
platforms:
11-
- name: Ubuntu
12-
versions:
13-
- trusty
14-
- xenial
15-
- bionic
12+
- name: Ubuntu
13+
versions:
14+
- trusty
15+
- xenial
16+
- bionic
1617

1718
galaxy_tags:
1819
- certbot

molecule/default/Dockerfile.j2

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Molecule managed
2+
3+
{% if item.registry is defined %}
4+
FROM {{ item.registry.url }}/{{ item.image }}
5+
{% else %}
6+
FROM {{ item.image }}
7+
{% endif %}
8+
9+
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
10+
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all; \
11+
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
12+
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
13+
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
14+
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi

molecule/default/INSTALL.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
*******
2+
Docker driver installation guide
3+
*******
4+
5+
Requirements
6+
============
7+
8+
* General molecule dependencies (see https://molecule.readthedocs.io/en/latest/installation.html)
9+
* Docker Engine
10+
* docker-py
11+
* docker
12+
13+
Install
14+
=======
15+
16+
$ sudo pip install docker-py

molecule/default/molecule.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
dependency:
3+
name: galaxy
4+
driver:
5+
name: docker
6+
lint:
7+
name: yamllint
8+
platforms:
9+
- name: instance-trusty
10+
image: ubuntu:14.04
11+
- name: instance-xenial
12+
image: ubuntu:16.04
13+
- name: instance-bionic
14+
image: ubuntu:18.04
15+
provisioner:
16+
name: ansible
17+
lint:
18+
name: ansible-lint
19+
scenario:
20+
name: default
21+
verifier:
22+
name: testinfra
23+
lint:
24+
name: flake8

molecule/default/playbook.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- name: Converge
3+
hosts: all
4+
roles:
5+
- role: certbot_nginx
Binary file not shown.
710 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)