Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -9,3 +9,4 @@ __pycache__ .vagrant/ *.log *.retry .tox .pre-commit-config.yaml +5 −17 Original line number Diff line number Diff line - repo: https://github.com/pre-commit/pre-commit-hooks sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469 sha: v0.7.1 hooks: - id: check-added-large-files - id: check-json Loading @@ -9,27 +9,15 @@ - id: flake8 - id: check-symlinks - repo: https://github.com/adarnimrod/ansible-pre-commit.git sha: 0fadd691465b97db8992cfc66650f630e433324b sha: v0.6.0 hooks: - id: ansible-syntax-check always_run: true files: tests/playbook.yml args: - tests/playbook.yml - repo: https://github.com/willthames/ansible-lint sha: 959ab0f525e9abb19cf75f34381015cf33695f61 sha: v3.4.13 hooks: - id: ansible-lint always_run: true files: tests/playbook.yml args: - tests/playbook.yml - repo: local - repo: https://github.com/adarnimrod/python-pre-commit.git sha: v0.2.0 hooks: - id: piprot name: piprot description: Check up-to-date Python requirements language: system entry: piprot --quiet --outdated tests/requirements.txt files: requirements.txt always_run: true .travis.yml +17 −25 Original line number Diff line number Diff line --- language: python python: ["2.7", "3.5"] python: "2.7" dist: trusty sudo: True group: beta services: [docker] env: - platform: openbsd60 driver: vagrant - platform: openbsd59 driver: vagrant - platform: xenial driver: vagrant - platform: trusty driver: vagrant - platform: jessie driver: vagrant - platform: wheezy driver: vagrant - driver: docker platform: all global: - VBOX_MEMORY=2048 - VBOX_HWVIRTEX=off matrix: - TOXENV=pre-commit - TOXENV=openbsd60 - TOXENV=xenial - TOXENV=trusty - TOXENV=precise - &stretch TOXENV=stretch - &jessie TOXENV=jessie - TOXENV=wheezy matrix: fast_finish: True allow_failures: - python: "3.5" - env: platform=openbsd59 driver=vagrant - env: platform=jessie driver=vagrant - env: platform=wheezy driver=vagrant - env: *stretch cache: - pip - directories: Loading @@ -37,14 +31,12 @@ install: - 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 - sudo dpkg -i vagrant_1.9.1_x86_64.deb - pip install -r tests/requirements.txt | cat - ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles - molecule dependency - pip install tox-travis | cat script: - pre-commit run --all-files - molecule test --driver $driver --platform $platform - travis_wait 45 tox notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ email: false on_failure: never README.rst +3 −16 Original line number Diff line number Diff line Loading @@ -31,22 +31,9 @@ See :code:`tests/playbook.yml`. Testing ------- Testing requires Python 2.7 and either Docker or Vagrant and Virtualbox. Install the Python dependencies, dependent roles and roles required for testing: .. 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 Testing requires Python 2.7, Tox, Vagrant and Virtualbox. To test simply run :code:`tox`. `Pre-commit <http://pre-commit.com/>`_ is also setup for this project. License ------- Loading meta/main.yml +8 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ galaxy_info: description: An example Ansible role company: Shore technologies license: MIT min_ansible_version: 2.0 min_ansible_version: 2.3 platforms: - name: OpenBSD versions: Loading @@ -11,5 +11,12 @@ galaxy_info: - name: Ubuntu versions: - xenial - trusty - precise - name: Debian versions: - stretch - jessie - wheezy galaxy_tags: [ ansible ] dependencies: [] Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -9,3 +9,4 @@ __pycache__ .vagrant/ *.log *.retry .tox
.pre-commit-config.yaml +5 −17 Original line number Diff line number Diff line - repo: https://github.com/pre-commit/pre-commit-hooks sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469 sha: v0.7.1 hooks: - id: check-added-large-files - id: check-json Loading @@ -9,27 +9,15 @@ - id: flake8 - id: check-symlinks - repo: https://github.com/adarnimrod/ansible-pre-commit.git sha: 0fadd691465b97db8992cfc66650f630e433324b sha: v0.6.0 hooks: - id: ansible-syntax-check always_run: true files: tests/playbook.yml args: - tests/playbook.yml - repo: https://github.com/willthames/ansible-lint sha: 959ab0f525e9abb19cf75f34381015cf33695f61 sha: v3.4.13 hooks: - id: ansible-lint always_run: true files: tests/playbook.yml args: - tests/playbook.yml - repo: local - repo: https://github.com/adarnimrod/python-pre-commit.git sha: v0.2.0 hooks: - id: piprot name: piprot description: Check up-to-date Python requirements language: system entry: piprot --quiet --outdated tests/requirements.txt files: requirements.txt always_run: true
.travis.yml +17 −25 Original line number Diff line number Diff line --- language: python python: ["2.7", "3.5"] python: "2.7" dist: trusty sudo: True group: beta services: [docker] env: - platform: openbsd60 driver: vagrant - platform: openbsd59 driver: vagrant - platform: xenial driver: vagrant - platform: trusty driver: vagrant - platform: jessie driver: vagrant - platform: wheezy driver: vagrant - driver: docker platform: all global: - VBOX_MEMORY=2048 - VBOX_HWVIRTEX=off matrix: - TOXENV=pre-commit - TOXENV=openbsd60 - TOXENV=xenial - TOXENV=trusty - TOXENV=precise - &stretch TOXENV=stretch - &jessie TOXENV=jessie - TOXENV=wheezy matrix: fast_finish: True allow_failures: - python: "3.5" - env: platform=openbsd59 driver=vagrant - env: platform=jessie driver=vagrant - env: platform=wheezy driver=vagrant - env: *stretch cache: - pip - directories: Loading @@ -37,14 +31,12 @@ install: - 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 - sudo dpkg -i vagrant_1.9.1_x86_64.deb - pip install -r tests/requirements.txt | cat - ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles - molecule dependency - pip install tox-travis | cat script: - pre-commit run --all-files - molecule test --driver $driver --platform $platform - travis_wait 45 tox notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ email: false on_failure: never
README.rst +3 −16 Original line number Diff line number Diff line Loading @@ -31,22 +31,9 @@ See :code:`tests/playbook.yml`. Testing ------- Testing requires Python 2.7 and either Docker or Vagrant and Virtualbox. Install the Python dependencies, dependent roles and roles required for testing: .. 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 Testing requires Python 2.7, Tox, Vagrant and Virtualbox. To test simply run :code:`tox`. `Pre-commit <http://pre-commit.com/>`_ is also setup for this project. License ------- Loading
meta/main.yml +8 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ galaxy_info: description: An example Ansible role company: Shore technologies license: MIT min_ansible_version: 2.0 min_ansible_version: 2.3 platforms: - name: OpenBSD versions: Loading @@ -11,5 +11,12 @@ galaxy_info: - name: Ubuntu versions: - xenial - trusty - precise - name: Debian versions: - stretch - jessie - wheezy galaxy_tags: [ ansible ] dependencies: []