---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v1.3.0
+ rev: v4.1.0
hooks:
- id: trailing-whitespace
- repo: https://github.com/jorisroovers/gitlint
- rev: v0.11.0
+ rev: v0.17.0
hooks:
- id: gitlint
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
-- name: Setup Ansible PPA
- block:
- # gnupg2 is required to install the PPA and is missing on Ubuntu 18.04
- - name: Install gnupg2
- apt:
- name: gnupg2
- state: present
- - name: Setup Ansible PPA
- apt_repository:
- repo: ppa:ansible/ansible
- # Ubuntu 20.04 PPA is not yet available so skip installing it for now.
- # TODO: Figure out if recent versions of Ansible in Ubuntu is sufficient for
- # our use without the need to pull in from PPA.
- when: ansible_distribution == 'Ubuntu' and ansible_facts['distribution_major_version'] is version('20', '<')
- become: true
-
# Required for direct install of parallel package from linuxsoft.cern.ch
- rpm_key:
state: present
- name: Fetch PlantUML
get_url:
url: https://sourceforge.net/projects/plantuml/files/plantuml.jar/download
+ validate_certs: no
dest: /opt/plantuml/plantuml.jar
mode: 0644
register: result
deps =
pre-commit
commands =
- pre-commit install --hook-type commit-msg
- pre-commit run --all-files
+ pre-commit run --all-files --show-diff-on-failure
+ pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG