Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Commit

Permalink
fix ppa problems for ubuntu distro
Browse files Browse the repository at this point in the history
remove redhat based
  • Loading branch information
bodsch committed Aug 11, 2022
1 parent 4f61ab1 commit 84952e4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 69 deletions.
39 changes: 1 addition & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
image:
- debian:11
- ubuntu:20.04
- ubuntu:22.04
ansible-version:
- '5.1'
- '6.1'
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions meta/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ galaxy_info:
versions:
# 20.04
- focal
- name: EL
versions:
- 8
# 22.04
- jammy

galaxy_tags:
- dns
Expand Down
2 changes: 1 addition & 1 deletion molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
26 changes: 3 additions & 23 deletions tasks/repositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 84952e4

Please sign in to comment.