Skip to content

Commit

Permalink
install molecule-docker plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Aug 16, 2021
1 parent b6769a0 commit db00b40
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 60 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
MOLECULE_DEBUG: 1
run: |
sudo apt install python-is-python3 --yes
python -m pip install --upgrade pip setuptools
pip install tox
python -m pip install tox
tox
1 change: 1 addition & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
extends: default

ignore: |
Expand Down
16 changes: 16 additions & 0 deletions molecule/alternative/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---

- hosts: all
any_errors_fatal: true
roles:
- ansible-minio
vars:
minio_server_envfile: "/opt/minio"
minio_server_addr: ":80"
minio_server_datadirs:
- "/srv/data1"
- "/srv/data2"
- "/srv/data3"
- "/srv/data4"
minio_server_args:
- "/srv/data{1...4}"
23 changes: 4 additions & 19 deletions molecule/alternative/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,13 @@ dependency:
name: galaxy

platforms:
- name: minio-centos-7
image: paulfantom/centos-molecule:7
- name: minio-centos-8
image: paulfantom/centos-molecule:8
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-fedora-27
image: paulfantom/fedora-molecule:27
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-debian-9
image: paulfantom/debian-molecule:9
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-ubuntu-18.04
image: paulfantom/ubuntu-molecule:18.04
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-ubuntu-16.04
image: paulfantom/ubuntu-molecule:16.04
- name: minio-ubuntu-20.04
image: paulfantom/ubuntu-molecule:20.04
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand Down
15 changes: 15 additions & 0 deletions molecule/cluster/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---

- hosts: all
any_errors_fatal: true
roles:
- ansible-minio
vars:
minio_server_envfile: "/opt/minio"
minio_server_datadirs:
- "/data1"
- "/data2"
- "/data3"
- "/data4"
minio_server_args:
- "http://{{ ansible_hostname }}/data{1...4}"
23 changes: 4 additions & 19 deletions molecule/cluster/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,13 @@ dependency:
name: galaxy

platforms:
- name: minio-centos-7
image: paulfantom/centos-molecule:7
- name: minio-centos-8
image: paulfantom/centos-molecule:8
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-fedora-27
image: paulfantom/fedora-molecule:27
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-debian-9
image: paulfantom/debian-molecule:9
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-ubuntu-18.04
image: paulfantom/ubuntu-molecule:18.04
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-ubuntu-16.04
image: paulfantom/ubuntu-molecule:16.04
- name: minio-ubuntu-20.04
image: paulfantom/ubuntu-molecule:20.04
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand Down
6 changes: 6 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---

- hosts: all
any_errors_fatal: true
roles:
- ansible-minio
23 changes: 4 additions & 19 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,13 @@ dependency:
name: galaxy

platforms:
- name: minio-centos-7
image: paulfantom/centos-molecule:7
- name: minio-centos-8
image: paulfantom/centos-molecule:8
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-fedora-27
image: paulfantom/fedora-molecule:27
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-debian-9
image: paulfantom/debian-molecule:9
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-ubuntu-18.04
image: paulfantom/ubuntu-molecule:18.04
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: minio-ubuntu-16.04
image: paulfantom/ubuntu-molecule:16.04
- name: minio-ubuntu-20.04
image: paulfantom/ubuntu-molecule:20.04
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand Down
2 changes: 2 additions & 0 deletions molecule/resources/create.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
- name: Create
hosts: localhost
vars:
ansible_python_interpreter: /usr/bin/python
connection: local
gather_facts: false
no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}"
Expand Down
2 changes: 2 additions & 0 deletions molecule/resources/destroy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
- name: Destroy
hosts: localhost
vars:
ansible_python_interpreter: /usr/bin/python
connection: local
gather_facts: false
no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}"
Expand Down
2 changes: 2 additions & 0 deletions molecule/resources/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
- name: Prepare
hosts: all
gather_facts: true
vars:
ansible_python_interpreter: /usr/bin/python
tasks:
- name: Install ansible support packages
package:
Expand Down
4 changes: 3 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
molecule>=2.15.0
molecule>=3.1.0
molecule[docker]
docker
requests
ansible-lint>=3.4.0
testinfra>=1.7.0
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ deps =
ansible28: ansible<2.9
ansible29: ansible<2.10
commands =
{posargs:molecule test --all --destroy always}
{posargs:molecule test --all}

0 comments on commit db00b40

Please sign in to comment.