Skip to content
This repository has been archived by the owner on May 8, 2022. It is now read-only.

Commit

Permalink
Updated Molecule to 3.0.8
Browse files Browse the repository at this point in the history
Keeping up with the latest changes.
  • Loading branch information
freemanjp committed Oct 9, 2020
1 parent fd0c9ae commit 63d8416
Show file tree
Hide file tree
Showing 16 changed files with 341 additions and 123 deletions.
2 changes: 2 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
skip_list:
- '106' # Role name {} does not match \^[a-z][a-z0-9_]+$\ pattern'
1 change: 1 addition & 0 deletions .moleculew/ansible_lint_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.3.5
1 change: 1 addition & 0 deletions .moleculew/docker_lib_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.3.1
1 change: 1 addition & 0 deletions .moleculew/flake8_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8.4
2 changes: 1 addition & 1 deletion .moleculew/molecule_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.22
3.0.8
2 changes: 1 addition & 1 deletion .moleculew/python_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.15
3.6.7
1 change: 1 addition & 0 deletions .moleculew/testinfra_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.3.1
1 change: 1 addition & 0 deletions .moleculew/yamllint_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.25.0
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
language: python
python: '2.7'
python: '3.6'

env:
global:
Expand Down
22 changes: 0 additions & 22 deletions molecule/default/Dockerfile.j2

This file was deleted.

2 changes: 1 addition & 1 deletion molecule/default/INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ widely recommended `'--user' flag`_ when invoking ``pip``.

.. code-block:: bash
$ pip install 'molecule[docker]'
$ python3 -m pip install 'molecule[docker]'
File renamed without changes.
14 changes: 5 additions & 9 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ dependency:
driver:
name: docker

lint:
name: yamllint
lint: |
set -e
yamllint .
ansible-lint
flake8
platforms:
- name: ansible-role-terminator-ubuntu-min
Expand All @@ -16,13 +19,6 @@ platforms:

provisioner:
name: ansible
lint:
name: ansible-lint

scenario:
name: default

verifier:
name: testinfra
lint:
name: flake8
22 changes: 22 additions & 0 deletions molecule/default/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""PyTest Fixtures."""
from __future__ import absolute_import

import os

import pytest


def pytest_runtest_setup(item):
"""Run tests only when under molecule with testinfra installed."""
try:
import testinfra
except ImportError:
pytest.skip("Test requires testinfra", allow_module_level=True)
if "MOLECULE_INVENTORY_FILE" in os.environ:
pytest.testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")
else:
pytest.skip(
"Test should run only from inside molecule.",
allow_module_level=True)
6 changes: 0 additions & 6 deletions molecule/default/tests/test_role.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import os

import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')


def test_terminator(host):
Expand Down
Loading

0 comments on commit 63d8416

Please sign in to comment.