Skip to content
Snippets Groups Projects
Commit adb25487 authored by nimrod's avatar nimrod
Browse files

Merge branch 'master' of /home/nimrod/Documents/Shore/Ansible/example

# Conflicts:
#	tasks/main.yml
parents 269f805b 0620acb4
No related branches found
No related tags found
No related merge requests found
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469 sha: v0.7.1
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-json - id: check-json
...@@ -9,22 +9,15 @@ ...@@ -9,22 +9,15 @@
- id: flake8 - id: flake8
- id: check-symlinks - id: check-symlinks
- repo: https://github.com/adarnimrod/ansible-pre-commit.git - repo: https://github.com/adarnimrod/ansible-pre-commit.git
sha: v0.5.0 sha: v0.6.0
hooks: hooks:
- id: ansible-syntax-check - id: ansible-syntax-check
always_run: true
files: tests/playbook.yml
args:
- tests/playbook.yml
- repo: https://github.com/willthames/ansible-lint - repo: https://github.com/willthames/ansible-lint
sha: 959ab0f525e9abb19cf75f34381015cf33695f61 sha: v3.4.12
hooks: hooks:
- id: ansible-lint - id: ansible-lint
always_run: true
files: tests/playbook.yml files: tests/playbook.yml
args:
- tests/playbook.yml
- repo: https://github.com/adarnimrod/python-pre-commit.git - repo: https://github.com/adarnimrod/python-pre-commit.git
sha: v0.1.0 sha: v0.2.0
hooks: hooks:
- id: piprot - id: piprot
...@@ -10,19 +10,18 @@ env: ...@@ -10,19 +10,18 @@ env:
matrix: matrix:
- TOXENV=pre-commit - TOXENV=pre-commit
- TOXENV=openbsd60 - TOXENV=openbsd60
- &openbsd59 TOXENV=openbsd59
- TOXENV=xenial - TOXENV=xenial
- TOXENV=trusty - TOXENV=trusty
- TOXENV=precise - TOXENV=precise
- &stretch TOXENV=stretch - &stretch TOXENV=stretch
- TOXENV=jessie - &jessie TOXENV=jessie
- TOXENV=wheezy - TOXENV=wheezy
matrix: matrix:
fast_finish: True fast_finish: True
allow_failures: allow_failures:
- python: "3.5" - python: "3.5"
- env: *openbsd59
- env: *stretch - env: *stretch
- env: *jessie
cache: cache:
- pip - pip
- directories: - directories:
...@@ -33,7 +32,7 @@ install: ...@@ -33,7 +32,7 @@ install:
- sudo apt-get install -y linux-headers-$(uname -r) virtualbox - sudo apt-get install -y linux-headers-$(uname -r) virtualbox
- wget https://releases.hashicorp.com/vagrant/1.9.1/vagrant_1.9.1_x86_64.deb - wget https://releases.hashicorp.com/vagrant/1.9.1/vagrant_1.9.1_x86_64.deb
- sudo dpkg -i vagrant_1.9.1_x86_64.deb - sudo dpkg -i vagrant_1.9.1_x86_64.deb
- pip install tox | cat - pip install tox-travis | cat
script: script:
- travis_wait 45 tox - travis_wait 45 tox
......
...@@ -29,21 +29,9 @@ See :code:`tests/playbook.yml`. ...@@ -29,21 +29,9 @@ See :code:`tests/playbook.yml`.
Testing Testing
------- -------
Testing requires Python 2.7, Vagrant and Virtualbox. Install the Python Testing requires Python 2.7, Tox, Vagrant and Virtualbox. To test simply run
dependencies, dependent roles and roles required for testing: :code:`tox`. `Pre-commit <http://pre-commit.com/>`_ is also setup for this
project.
.. code:: shell
pip install -r tests/requirements.txt
ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles
molecule dependency
To run the full test suite:
.. code:: shell
pre-commit run --all-files
molecule test --platform all
License License
------- -------
......
...@@ -22,8 +22,6 @@ vagrant: ...@@ -22,8 +22,6 @@ vagrant:
platforms: platforms:
- name: openbsd60 - name: openbsd60
box: fnichol/openbsd-6.0-i386 box: fnichol/openbsd-6.0-i386
- name: openbsd59
box: fnichol/openbsd-5.9-i386
- name: xenial - name: xenial
box: ubuntu/xenial32 box: ubuntu/xenial32
- name: trusty - name: trusty
......
ansible==2.2.1.0 ansible==2.3.0.0
testinfra==1.5.3 testinfra==1.5.5
molecule==1.20.0 molecule==1.23.2
ansible-lint==3.4.10 ansible-lint==3.4.12
pre-commit==0.12.2
piprot==0.9.7
python-vagrant==0.5.14 python-vagrant==0.5.14
netaddr==0.7.19 netaddr==0.7.19
passlib==1.7.1 passlib==1.7.1
bcrypt==3.1.2 bcrypt==3.1.3
[tox] [tox]
skip_install = True skip_install = True
skipsdist = True skipsdist = True
envlist = openbsd60,openbsd59,xenial,trusty,precise,stretch,jessie,wheezy envlist = openbsd60,xenial,trusty,precise,stretch,jessie,wheezy
[testenv:pre-commit] [testenv]
envdir = {toxinidir}/.tox
deps = -rtests/requirements.txt deps = -rtests/requirements.txt
passenv = HOME VBOX* ANSIBLE_*
whitelist_externals = whitelist_externals =
sh sh
commands = commands =
sh -c "ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles" sh -c "ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles"
molecule dependency molecule test --platform {envname}
pre-commit run --all-files
[testenv] [testenv:pre-commit]
deps = -rtests/requirements.txt envdir = {toxinidir}/.tox
passenv = HOME deps =
-rtests/requirements.txt
pre-commit
passenv = HOME VBOX* ANSIBLE_*
whitelist_externals = whitelist_externals =
sh sh
commands = commands =
sh -c "ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles" sh -c "ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles"
molecule test --platform {envname} molecule dependency
pre-commit run --all-files
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment