Commit 8b435020 authored by Tomas Krizek's avatar Tomas Krizek

distro/tests: separate ansible role for repo conf

parent 8c1ceabe
Pipeline #49712 passed with stages
in 20 minutes and 11 seconds
# Knot Resolver testing role
**WARNING**: This is for testing only, not currently suitable for production.
Role which sets up Knot Resolver and performs checks it is running, including:
- Setting up upstream repositories
- Installing Knot Resolver
- Perfoming basic tests
......@@ -2,5 +2,4 @@
repos:
- knot-resolver-latest
distro: "{{ ansible_distribution | replace(' ', '_') }}"
repo_file_url: "https://download.opensuse.org/repositories/home:CZ-NIC:{{ item }}/{{ obs_distro_name }}/home:CZ-NIC:{{ item }}.repo"
update_packages: false
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.15 (GNU/Linux)
mQENBFqFjysBCADWVYuSgTuduZNAUpq4w+X9EnBwDMibkJCZuNvjvwXNaFeWKOHf
YEwcSFETOazApzjLxBj/eDTHtl0w0wvJUWsbTOEdJjue1X05X3nxQIiyXXIqjtzY
OmMyJa2Y9zUWwdAj+miI81EaWN0aDSoa4LG+9cqlYIOO4jZnAQ3uVvCRypB9Lx6r
2HGTSWaw77l3CHTPD0YVLbv90a5ChNsb3JMpiPhhK8F3pQxu8CfTz/0npEHxbRlK
xWNIr773bhDonnGsapGPfrdy5afb/AxCiUuflKCrG0qg1l8M5OT4LxnnB8sqTXwH
EFwHaWkwhiBG2hRG/Jco3k4sytnwr82VFKD1ABEBAAG0OGhvbWU6Q1otTklDIE9C
UyBQcm9qZWN0IDxob21lOkNaLU5JQ0BidWlsZC5vcGVuc3VzZS5vcmc+iQE+BBMB
CAAoBQJahY8rAhsDBQkEHrAABgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRB0
Bi2zah9ACWtKB/9CB5Ms/zC1kbYP6I7FrDi0KzfekQ/SrXq4acf/UrJwguVGniFs
f/SevD7Knyvg9MBrVXguzE14oOpahJe0jHnDQCFe6S6mT7VybtylOUECx2f3zd2S
MYQ96kzNQiP1yfaWi/bOi+ykpVZC7GYL9rMW2uzKisZSB64KT7Efd+0FQf57np0I
ZnW54m62Oaf1ltX6Y0VNLhz8jOM4xK1EqxwMncj1/a+yB0+a8w1j8gR2yluQTfdG
9QsUNU4VT86he5aYivVTJnY0XgqZYvXrqM0D0YfabjyGosc1zrnWwO5wVrGhcVYM
obTkcAN+C2nm01R2ip2bjJ8fz8nYvYzNGkpniEYEExECAAYFAlqFjywACgkQOzAR
t2udZSNgVACgiu9vroIHHXRMIx/w8JJrNEq/LaoAn2UVyQrPbspOV6mlToaKEa3r
YheD
=IUCb
-----END PGP PUBLIC KEY BLOCK-----
......@@ -2,9 +2,6 @@
- name: Include distribution specific vars
include_vars: "{{ distro }}.yaml"
- name: Configure upstream reporitories
include: "configure_repos/{{ distro }}.yaml"
- name: Update all packages
package:
name: '*'
......
---
obs_distro_name: "{{ distro }}_{{ ansible_distribution_major_version }}_EPEL"
show_package_version: rpm -qi knot-resolver | grep '^Version'
packages:
- knot-resolver
......
---
obs_distro_name: "{{ distro }}_9.0"
show_package_version: dpkg -s knot-resolver | grep '^Version'
packages:
- knot-resolver
......
---
obs_distro_name: "{{ distro }}_{{ ansible_distribution_major_version }}"
show_package_version: rpm -qi knot-resolver | grep '^Version'
packages:
- knot-resolver
......
---
obs_distro_name: "x{{ distro }}_{{ ansible_distribution_version }}"
show_package_version: dpkg -s knot-resolver | grep '^Version'
packages:
- knot-resolver
......
---
obs_distro_name: "{{ distro }}_15.0"
show_package_version: rpm -qi knot-resolver | grep '^Version'
packages:
- knot-resolver
......
---
obs_distro_name: "{{ distro }}"
show_package_version: rpm -qi knot-resolver | grep '^Version'
update_packages: true
packages:
......
---
obs_distro: "{{ ansible_distribution | replace(' ', '_') }}"
obs_repofile_url: "https://download.opensuse.org/repositories/home:CZ-NIC:{{ item }}/{{ obs_repo_version }}/home:CZ-NIC:{{ item }}.repo"
......@@ -6,6 +6,6 @@
- name: Download repo file(s)
get_url:
url: "{{ repo_file_url }}"
url: "{{ obs_repofile_url }}"
dest: /etc/yum.repos.d/home:CZ-NIC:{{ item }}.repo
with_items: "{{ repos }}"
---
- name: Add upstream package signing key
apt_key:
data: "{{ lookup('file', 'Release.pub') }}"
url: https://gitlab.labs.nic.cz/knot/knot-resolver-release/raw/master/cznic-obs.gpg.asc
state: present
- name: Add OBS repo(s)
apt_repository:
repo: >
deb http://download.opensuse.org/repositories/home:/CZ-NIC:/{{ item }}/{{ obs_distro_name }}/ /
deb http://download.opensuse.org/repositories/home:/CZ-NIC:/{{ item }}/{{ obs_repo_version }}/ /
state: present
update_cache: true
with_items: "{{ repos }}"
---
- name: Download repo file(s)
get_url:
url: "{{ repo_file_url }}"
url: "{{ obs_repofile_url }}"
dest: "/etc/yum.repos.d/home:CZ-NIC:{{ item }}.repo"
with_items: "{{ repos }}"
---
- name: Add upstream package signing key
apt_key:
url: https://gitlab.labs.nic.cz/knot/knot-resolver-release/raw/master/cznic-obs.gpg.asc
state: present
- name: Add OBS repo(s)
apt_repository:
repo: >
deb http://download.opensuse.org/repositories/home:/CZ-NIC:/{{ item }}/{{ obs_repo_version }}/ /
state: present
update_cache: true
with_items: "{{ repos }}"
---
- name: Include distribution specific vars
include_vars: "{{ obs_distro }}.yaml"
- name: Configure upstream reporitories
include: "{{ obs_distro }}.yaml"
---
- name: Add upstream repo(s)
zypper_repository:
repo: "{{ repo_file_url}}"
repo: "{{ obs_repofile_url }}"
state: present
disable_gpg_check: true # auto_import_keys is broken
with_items: "{{ repos }}"
......
---
- name: Add upstream repo(s)
zypper_repository:
repo: "{{ obs_repofile_url }}"
state: present
disable_gpg_check: true # auto_import_keys is broken
with_items: "{{ repos }}"
- name: Refresh all repositories
zypper_repository:
repo: '*'
runrefresh: true
---
obs_repo_version: "{{ obs_distro }}_{{ ansible_distribution_major_version }}_EPEL"
---
obs_repo_version: "{{ obs_distro }}_{{ ansible_distribution_major_version }}.0"
---
obs_repo_version: "{{ obs_distro }}_{{ ansible_distribution_major_version }}"
---
obs_repo_version: "x{{ obs_distro }}_{{ ansible_distribution_version }}"
---
obs_repo_version: "{{ obs_distro }}_{{ ansible_distribution_version }}"
......@@ -8,4 +8,5 @@
- repos.yaml
roles:
- obs_repos
- knot_resolver
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment