From 4a439b84bbddd006f6217f0febcae5fe7c72ff18 Mon Sep 17 00:00:00 2001
From: Chris Croome <chris@webarchitects.co.uk>
Date: Sat, 24 Jun 2023 12:15:39 +0100
Subject: [PATCH] pre-commit update

---
 .pre-commit-config.yaml | 24 +++++++++++++++++++++---
 tasks/config.yml        |  4 ++--
 2 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bc4bf24..8da5a5a 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -8,11 +8,29 @@
 #
 # You should have received a copy of the GNU General Public License along with the Webarchitects Apache Ansible role. If not, see <https://www.gnu.org/licenses/>.
 ---
-# https://yamllint.readthedocs.io/en/stable/integration.html
-# https://github.com/adrienverge/yamllint/tags
 repos:
+  # https://github.com/adrienverge/yamllint/tags
   - repo: https://github.com/adrienverge/yamllint.git
-    rev: v1.31.0
+    rev: v1.32.0
     hooks:
       - id: yamllint
+        name: YAML Lint
+  # https://github.com/ansible/ansible-lint/releases
+  - repo: https://github.com/ansible/ansible-lint.git
+    rev: v6.17.2
+    hooks:
+      - id: ansible-lint
+        name: Ansible Lint
+        language: python
+        additional_dependencies:
+          # https://github.com/kellyjonbrazil/jc/releases
+          - jc==1.23.2
+          # https://github.com/jmespath/jmespath.py/tags
+          - jmespath==1.0.1
+  # https://github.com/jackdewinter/pymarkdown/releases
+  - repo: https://github.com/jackdewinter/pymarkdown
+    rev: v0.9.11
+    hooks:
+      - id: pymarkdown
+        name: Markdown Lint
 ...
diff --git a/tasks/config.yml b/tasks/config.yml
index b2b0af4..16464f1 100644
--- a/tasks/config.yml
+++ b/tasks/config.yml
@@ -177,13 +177,13 @@
             name: acmesh
             tasks_from: letsencrypt.yml
           vars:
-            common_name: "{{ inventory_hostname }}"
+            acmesh_common_name: "{{ inventory_hostname }}"
 
       when:
         - ( "md" not in apache_mods_enabled ) or ( apache_cert.stat is defined and not apache_cert.stat.exists )
         - ( "ssl" in apache_mods_enabled )
         - ( "le" in apache_conf_enabled )
-        - ( common_name is defined ) and ( common_name == inventory_hostname )
+        - ( acmesh_common_name is defined ) and ( acmesh_common_name == inventory_hostname )
 
   tags:
     - apache
-- 
GitLab