Fix: Remove ansible package/repo install 26/70826/3
authorAnil Belur <abelur@linuxfoundation.org>
Thu, 6 Oct 2022 12:46:36 +0000 (22:46 +1000)
committerVanessa Valderrama <vvalderrama@linuxfoundation.org>
Thu, 6 Oct 2022 16:18:35 +0000 (11:18 -0500)
Ansible is mostly used with the packer builds it's better
to install ansible from PyPI, since this gives better control
over the upstream version and managing dependencies.

Update the pre-commit dependencies and molecule default
platform config.

Issue-ID: RELENG-4473
Change-Id: I5635d1633ad02e169957361ea354b092ade29c18
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Signed-off-by: Vanessa Valderrama <vvalderrama@linuxfoundation.org>
.pre-commit-config.yaml
molecule/default/molecule.yml
tasks/main.yml
tox.ini
vars/main.yml

index c1879a6..b10b09b 100644 (file)
@@ -1,11 +1,11 @@
 ---
 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
index 79ab304..7274ab6 100644 (file)
@@ -11,9 +11,7 @@ platforms:
   - name: centos7
     image: centos:7
   - name: centos8
-    image: centos:8
-  - name: ubuntu1604
-    image: ubuntu:16.04
+    image: quay.io/pycontribs/centos:stream8
   - name: ubuntu1804
     image: ubuntu:18.04
   - name: ubuntu2004
index 36e34f1..3845bd1 100644 (file)
@@ -6,22 +6,6 @@
     - "{{ 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
@@ -59,6 +43,7 @@
     - 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
diff --git a/tox.ini b/tox.ini
index a8d316b..0942618 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -24,5 +24,5 @@ basepython = python3
 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
index 912d27a..d631243 100644 (file)
@@ -1,7 +1,6 @@
 ---
 lf_recommended_tools_packages: "{{ lf_recommended_tools_packages_common }} + {{ lf_recommended_tools_packages_distro }}"
 lf_recommended_tools_packages_common:
-  - ansible
   - ant
   - crudini
   - curl