From 84952e47454cf8087e552951a42b2a0a151e463c Mon Sep 17 00:00:00 2001 From: Bodo Schulz Date: Thu, 11 Aug 2022 16:55:51 +0200 Subject: [PATCH] fix ppa problems for ubuntu distro remove redhat based --- .github/workflows/main.yml | 39 +----------------------------------- README.md | 4 ---- meta/main.yaml | 5 ++--- molecule/default/prepare.yml | 2 +- tasks/repositories.yaml | 26 +++--------------------- 5 files changed, 7 insertions(+), 69 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2fe77a9..1a2810b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -70,6 +70,7 @@ jobs: image: - debian:11 - ubuntu:20.04 + - ubuntu:22.04 ansible-version: - '5.1' - '6.1' @@ -101,44 +102,6 @@ jobs: ANSIBLE_FORCE_COLOR: '1' DISTRIBUTION: ${{ matrix.image }} - rpm: - name: "${{ matrix.image }} / ansible: ${{ matrix.ansible-version }}" - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - image: - - oraclelinux:8 - - rockylinux:8 - - almalinux:8 - ansible-version: - - '4.10' - - '5.1' - steps: - - name: check out the codebase. - uses: actions/checkout@v2 - with: - path: 'ansible-knot' - - - name: 🐍 set up python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - - name: install dependencies - run: | - python -m pip install --upgrade pip - pip install -r test-requirements.txt - - - name: test with tox - run: | - tox -e ansible_$(printf "${{ matrix.ansible-version }}") \ - -- molecule test --scenario-name default - env: - PY_COLORS: '1' - ANSIBLE_FORCE_COLOR: '1' - DISTRIBUTION: ${{ matrix.image }} - publish: if: github.ref == 'refs/heads/main' needs: diff --git a/README.md b/README.md index c183ec9..943fffa 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,6 @@ Tested on * Debian based - Debian 10 / 11 - Ubuntu 20.04 -* RedHat based - - Alma Linux 8 - - Rocky Linux 8 - - OracleLinux 8 ## configuration diff --git a/meta/main.yaml b/meta/main.yaml index 2cb3071..067c53b 100644 --- a/meta/main.yaml +++ b/meta/main.yaml @@ -21,9 +21,8 @@ galaxy_info: versions: # 20.04 - focal - - name: EL - versions: - - 8 + # 22.04 + - jammy galaxy_tags: - dns diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index e272dba..2920326 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -35,6 +35,6 @@ - debug: msg: - "os family : {{ ansible_distribution }} ({{ ansible_os_family }})" - - "distribution version : {{ ansible_distribution_major_version }}" + - "distribution version : {{ ansible_distribution_major_version }} / {{ ansible_distribution_release }}" - "ansible version : {{ ansible_version.full }}" - "python version : {{ ansible_python.version.major }}.{{ ansible_python.version.minor }}" diff --git a/tasks/repositories.yaml b/tasks/repositories.yaml index d771500..6980c12 100644 --- a/tasks/repositories.yaml +++ b/tasks/repositories.yaml @@ -8,7 +8,7 @@ id: 8C0A90B7DE9CAC3B4A7BD5798A0EFB02C84B1E9B url: https://deb.knot-dns.cz/apt.gpg - - name: install official docker repositories for debian based + - name: install official knot repositories for debian based template: src: apt_knot.list.j2 dest: /etc/apt/sources.list.d/knot.list @@ -20,36 +20,16 @@ - name: ubuntu block: - - name: add knot ppa + - name: add knot ppa for ubuntu {{ ansible_distribution_release }} apt_repository: repo: ppa:cz.nic-labs/knot-dns-latest + codename: "{{ ansible_distribution_release }}" state: present update_cache: true validate_certs: false when: - ansible_distribution | lower == 'ubuntu' -- name: redhat family - block: - - name: Import EPEL GPG key. - rpm_key: - key: https://archive.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }} - state: present - - - name: install EPEL repository - yum_repository: - name: epel - state: present - description: Extra Packages for Enterprise Linux {{ ansible_distribution_major_version }} - $basearch - baseurl: http://download.fedoraproject.org/pub/epel/{{ ansible_distribution_major_version }}/$basearch - gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }} - metalink: https://mirrors.fedoraproject.org/metalink?repo=epel-{{ ansible_distribution_major_version }}&arch=$basearch&infra=$infra&content=$contentdir - failovermethod: priority - gpgcheck: 1 - enabled: 1 - when: - - ansible_os_family | lower == 'redhat' - - name: update package cache package: update_cache: true