Browse Source

Use centos8 stream images with molecule scenarios

There have been problems with centos7 lately with py2/py3.
Ansible's pip module used python2 instead of python3 for
creating virtual venv which lead to dependency issues with
infrared which should be installed only by py3.

This changes also bumps the linters, removing yamllint which is now
included in ansible-lint.

Change-Id: If117b438fd55b17ead4016aabc3feae6632e722b
changes/62/786462/8
Martin Kopec 1 month ago
committed by Sorin Sbarnea
parent
commit
8f57778228
4 changed files with 25 additions and 26 deletions
  1. +1
    -0
      .gitignore
  2. +3
    -10
      .pre-commit-config.yaml
  3. +10
    -8
      roles/collect_logs/molecule/default/molecule.yml
  4. +11
    -8
      roles/collect_logs/molecule/infrared/molecule.yml

+ 1
- 0
.gitignore View File

@ -70,3 +70,4 @@ releasenotes/build
# ansible retry files
*.retry
ansible_role_collect_logs.egg-info

+ 3
- 10
.pre-commit-config.yaml View File

@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
rev: 5.8.0
hooks:
- id: isort
- repo: https://github.com/python/black.git
@ -22,22 +22,15 @@ repos:
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.8.4
rev: 3.9.1
hooks:
- id: flake8
additional_dependencies:
- flake8-absolute-import
- flake8-black>=0.1.1
language_version: python3
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict -f parsable
- repo: https://github.com/ansible/ansible-lint.git
rev: v5.0.0
rev: v5.0.7
hooks:
- id: ansible-lint
always_run: true


+ 10
- 8
roles/collect_logs/molecule/default/molecule.yml View File

@ -3,15 +3,17 @@ driver:
name: docker
log: true
platforms:
- name: centos7
image: docker.io/pycontribs/centos:7
# - name: centos7
# image: quay.io/pycontribs/centos:centos7
# pre_build_image: true
- name: centos8
# image below is based on official quay.io/centos/centos:stream8 but
# it has python preinstalled on it.
image: quay.io/pycontribs/centos:stream8
pre_build_image: true
# - name: centos8
# image: docker.io/pycontribs/centos:8
# pre_build_image: true
# - name: ubuntu
# image: docker.io/pycontribs/ubuntu:latest
# pre_build_image: true
# - name: debian
# image: quay.io/pycontribs/python:3.8-slim-buster
# pre_build_image: true
provisioner:
name: ansible
config_options:


+ 11
- 8
roles/collect_logs/molecule/infrared/molecule.yml View File

@ -3,15 +3,17 @@ driver:
name: docker
log: true
platforms:
- name: centos7
image: docker.io/pycontribs/centos:7
# - name: centos7
# image: quay.io/pycontribs/centos7
# pre_build_image: true
- name: centos8
# image below is based on official quay.io/centos/centos:stream8 but
# it has python preinstalled on it.
image: quay.io/pycontribs/centos:stream8
pre_build_image: true
# - name: centos8
# image: docker.io/pycontribs/centos:8
# pre_build_image: true
# - name: ubuntu
# image: docker.io/pycontribs/ubuntu:latest
# pre_build_image: true
# - name: debian
# image: quay.io/pycontribs/3.8-slim-buster
# pre_build_image: true
provisioner:
name: ansible
config_options:
@ -19,6 +21,7 @@ provisioner:
interpreter_python: auto
forks: 50
stdout_callback: yaml
timeout: 30
ssh_connection:
pipelining: true
inventory:


Loading…
Cancel
Save