From 4fe9da8a6d05e78b0fc4741850f09487c2853a84 Mon Sep 17 00:00:00 2001 From: s3lph Date: Mon, 13 Jun 2022 21:21:46 +0200 Subject: [PATCH] Add option to install knot from the upstream cz.nic repository --- galaxy.yml | 2 +- roles/knot/defaults/main.yml | 4 ++++ roles/knot/tasks/install.yml | 12 ++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index bcfcd92..31ac599 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -7,7 +7,7 @@ namespace: s3lph name: nameserver # The version of the collection. Must be compatible with semantic versioning -version: "0.3.2" +version: "0.3.3" # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/roles/knot/defaults/main.yml b/roles/knot/defaults/main.yml index ce20362..5b17cce 100644 --- a/roles/knot/defaults/main.yml +++ b/roles/knot/defaults/main.yml @@ -1,5 +1,9 @@ --- +knot_repository_install: no +knot_repository_url: https://deb.knot-dns.cz/knot/ +knot_repository_distribution: "{{ ansible_distribution_release }}" + knot_server_rundir: /run/knot knot_server_user: knot knot_server_group: knot diff --git a/roles/knot/tasks/install.yml b/roles/knot/tasks/install.yml index 2684337..436da04 100644 --- a/roles/knot/tasks/install.yml +++ b/roles/knot/tasks/install.yml @@ -1,5 +1,17 @@ --- +- name: install knot repo key + ansible.builtin.apt_key: + url: https://deb.knot-dns.cz/apt.gpg + keyring: /etc/apt/trusted.gpg.d/knot.gpg + when: knot_repository_install + +- name: install knot repository + ansible.builtin.apt_repository: + repo: "deb {{ knot_repository_url }} {{ knot_repository_distribution }} main" + filename: knot + when: knot_repository_install + - name: install dependencies ansible.builtin.package: name: