Loading .pre-commit-config.yaml +1 −15 Original line number Diff line number Diff line Loading @@ -4,18 +4,4 @@ - id: check-added-large-files - id: check-yaml - id: check-merge-conflict - repo: https://www.shore.co.il/git/shell-pre-commit/ sha: v0.1.0 hooks: - id: shell-lint files: ansible-syntax-check|ansible-vault-check - repo: local hooks: - id: piprot name: piprot description: Check up-to-date Python requirements language: system entry: piprot args: ['--quiet', '--outdated'] files: requirements.txt always_run: true - id: flake8 .travis.yml +5 −1 Original line number Diff line number Diff line --- language: python python: "2.7" python: ["2.7", "3.3", "3.4", "3.5", "3.6"] dist: trusty sudo: false group: beta Loading @@ -9,8 +9,12 @@ cache: - directories: - $HOME/.pre-commit install: - pip install pre-commit script: - pre-commit run --all-files - pip install . notifications: email: false LICENSE.txt +1 −1 Original line number Diff line number Diff line MIT License Copyright (c) 2016 Adar Nimrod Copyright (c) 2017 Adar Nimrod Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Loading README.rst +8 −30 Original line number Diff line number Diff line Ansible pre-commit hooks ######################## Python pre-commit hooks ####################### .. image:: https://travis-ci.org/adarnimrod/ansible-pre-commit.svg?branch=master :target: https://travis-ci.org/adarnimrod/ansible-pre-commit .. image:: https://travis-ci.org/adarnimrod/python-pre-commit.svg?branch=master :target: https://travis-ci.org/adarnimrod/python-pre-commit Ansible `pre-commit <http://pre-commit.com/>`_ hooks. - ansible-syntax-check: The hook runs :code:`ansible --syntax-check` against playbooks declared. - ansible-vault-check: The hook verifies that files that have :code:`vault` in the filename are indeed vaulted. Dependencies ------------ - Ansible. - Pre-commit. - :code:`piprot`: Checks your requirements files for out of date packages. Installation ------------ Loading @@ -24,23 +15,10 @@ Add the following to your :code:`.pre-commit-config.yaml`: .. code:: yaml - repo: https://www.shore.co.il/git/ansible-pre-commit/ sha: v0.4.0 - repo: https://www.shore.co.il/git/python-pre-commit/ sha: v0.1.0 hooks: - id: ansible-syntax-check # In case you want to specify other playbook files: files: playbook.yml - id: ansible-vault-check And run :code:`pre-commit autoupdate` to update the hooks. In case your :code:`roles` directory isn't in the same directory as the playbook you're testing or at :code:`/etc/ansible/roles` you need to declare the roles search path in :code:`ansible.cfg` in the root of the repo like so: .. code:: [defaults] roles_path=path/to/roles/directory:path/to/another/roles/directory - id: piprot License ------- Loading VERSION +1 −1 Original line number Diff line number Diff line 0.5.0 0.1.0 Loading
.pre-commit-config.yaml +1 −15 Original line number Diff line number Diff line Loading @@ -4,18 +4,4 @@ - id: check-added-large-files - id: check-yaml - id: check-merge-conflict - repo: https://www.shore.co.il/git/shell-pre-commit/ sha: v0.1.0 hooks: - id: shell-lint files: ansible-syntax-check|ansible-vault-check - repo: local hooks: - id: piprot name: piprot description: Check up-to-date Python requirements language: system entry: piprot args: ['--quiet', '--outdated'] files: requirements.txt always_run: true - id: flake8
.travis.yml +5 −1 Original line number Diff line number Diff line --- language: python python: "2.7" python: ["2.7", "3.3", "3.4", "3.5", "3.6"] dist: trusty sudo: false group: beta Loading @@ -9,8 +9,12 @@ cache: - directories: - $HOME/.pre-commit install: - pip install pre-commit script: - pre-commit run --all-files - pip install . notifications: email: false
LICENSE.txt +1 −1 Original line number Diff line number Diff line MIT License Copyright (c) 2016 Adar Nimrod Copyright (c) 2017 Adar Nimrod Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Loading
README.rst +8 −30 Original line number Diff line number Diff line Ansible pre-commit hooks ######################## Python pre-commit hooks ####################### .. image:: https://travis-ci.org/adarnimrod/ansible-pre-commit.svg?branch=master :target: https://travis-ci.org/adarnimrod/ansible-pre-commit .. image:: https://travis-ci.org/adarnimrod/python-pre-commit.svg?branch=master :target: https://travis-ci.org/adarnimrod/python-pre-commit Ansible `pre-commit <http://pre-commit.com/>`_ hooks. - ansible-syntax-check: The hook runs :code:`ansible --syntax-check` against playbooks declared. - ansible-vault-check: The hook verifies that files that have :code:`vault` in the filename are indeed vaulted. Dependencies ------------ - Ansible. - Pre-commit. - :code:`piprot`: Checks your requirements files for out of date packages. Installation ------------ Loading @@ -24,23 +15,10 @@ Add the following to your :code:`.pre-commit-config.yaml`: .. code:: yaml - repo: https://www.shore.co.il/git/ansible-pre-commit/ sha: v0.4.0 - repo: https://www.shore.co.il/git/python-pre-commit/ sha: v0.1.0 hooks: - id: ansible-syntax-check # In case you want to specify other playbook files: files: playbook.yml - id: ansible-vault-check And run :code:`pre-commit autoupdate` to update the hooks. In case your :code:`roles` directory isn't in the same directory as the playbook you're testing or at :code:`/etc/ansible/roles` you need to declare the roles search path in :code:`ansible.cfg` in the root of the repo like so: .. code:: [defaults] roles_path=path/to/roles/directory:path/to/another/roles/directory - id: piprot License ------- Loading