Skip to content
Commits on Source (2)
......@@ -15,14 +15,6 @@
types: [yaml]
args: ['--inventory=localhost,', '--syntax-check']
- id: ansible-vault-check
name: Verify vaulted files
description: Verify that Ansible Vault files are vaulted.
language: pygrep
files: vault
entry: |-
ANSIBLE_VAULT
- id: docker-compose
name: docker-compose config
description: Validate the Docker Compose file using docker-compose config
......@@ -60,11 +52,3 @@
entry: ./hooks/branch-merge-conflicts
pass_filenames: false
always_run: true
- id: pip-outdated
name: pip-outdated
description: Find outdated Python dependencies in your requirements files.
language: python
entry: pip-outdated
args: ['--verbose']
files: 'requirements.*\.txt$'
......@@ -19,13 +19,11 @@ A collection of [pre-commit](https://pre-commit.com/) hooks.
hooks:
- id: shell-validate
- id: ansible-syntax-check
- id: ansible-vault-check
- id: docker-compose
- id: terraform-fmt
- id: terraform-validate
- id: poetry-check
- id: branch-merge-conflict
- id: pip-outdated
```
## Available hooks
......@@ -38,10 +36,6 @@ Check shell scripts with `/bin/sh -en`.
Check Ansible playbooks for syntax errors.
### `ansible-vault-check`
Verify that Ansible Vault files are vaulted.
### `docker-compose`
Validate the Docker Compose file using docker-compose config.
......@@ -64,10 +58,6 @@ Validate `pyproject.toml` files using Poetry.
Checks for merge conflicts with a specific branch.
### `pip-outdated`
Find outdated Python dependencies in your requirements files.
## License
This software is licensed under the MIT license (see `LICENSE.txt`).
......
"""Validate Docker Compose files."""
"""Validate pyproject.toml files."""
import argparse
import pathlib
......@@ -13,7 +13,9 @@ def main():
args = parser.parse_args()
hooks.utils.check_executable("poetry")
return hooks.utils.bulk_check(
lambda x: hooks.utils.check_dir(["poetry", "check"], dir=x),
lambda x: hooks.utils.check_directory(
["poetry", "check"], directory=x
),
hooks.utils.unique_directories(args.file),
)
......
......@@ -12,7 +12,6 @@ setup(
install_requires=[
"ansible>=4",
"docker-compose>=1.20",
"pip-outdated",
"poetry",
],
entry_points={
......@@ -20,7 +19,7 @@ setup(
"docker-compose-validate=hooks.docker_compose_validate:main",
"terraform-validate=hooks.terraform_validate:main",
"terraform-fmt=hooks.terraform_fmt:main",
"poetry-check=hook.poetry_check:main",
"poetry-check=hooks.poetry_check:main",
]
},
packages=find_packages(),
......
[tool.poetry]
name = "mnpw"
version = "0.1.5"
description = "My Nagios plugin wrapper"
authors = ["Adar Nimrod <nimrod@shore.co.il>"]
license = "MIT"
homepage = "https://git.shore.co.il/shore/mnpw"
repository = "https://git.shore.co.il/shore/mnpw"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Topic :: System :: Monitoring",
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
]