From e7856d8abc26a0f8098ba76a2e05be62229f130d Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Mon, 23 Jan 2017 06:05:52 +0200
Subject: [PATCH] - Convert to Python package.

---
 hooks.yaml | 5 +++--
 setup.py   | 8 ++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)
 create mode 100644 setup.py

diff --git a/hooks.yaml b/hooks.yaml
index 3097abb..593d42e 100644
--- a/hooks.yaml
+++ b/hooks.yaml
@@ -2,9 +2,10 @@
 - id: ansible-syntax-check
   name: Syntax check Ansible playbooks
   description: Check Ansible playbooks for syntax errors.
-  language: script
-  entry: ansible-syntax-check
+  language: python
+  entry: ansible-playbook
   files: playbook.yml
+  args: ['--inventory=localhost,', '--syntax-check']
 - id: ansible-vault-check
   name: Verify vaulted files
   description: Verify that Ansible Vault files are vaulted.
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..0e5dcfa
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,8 @@
+from setuptools import setup
+
+
+setup(
+        name='pre_commit_ansible_dummy_package',
+        version='0.1.0',
+        install_requires=['ansible==2.2.1.0'],
+)
-- 
GitLab