From 1e5dd61270ec04e9fcb0858ee3246f40ce135371 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Fri, 16 Aug 2019 05:15:58 +0200 Subject: [PATCH] wireguard/application: Extracted role misc/deb_unstable --- README.md | 1 + roles/misc/deb_unstable/meta/main.yml | 3 +++ roles/misc/deb_unstable/tasks/main.yml | 20 ++++++++++++++++++++ roles/wireguard/application/meta/main.yml | 3 +++ roles/wireguard/application/tasks/main.yml | 20 -------------------- 5 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 roles/misc/deb_unstable/meta/main.yml create mode 100644 roles/misc/deb_unstable/tasks/main.yml diff --git a/README.md b/README.md index 6dfb5ba..d8983cd 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Following roles have been defined to make creating a server configuration easy: - **slave** configures an automatic cloning slave for a domain - **hostname** configures the hostname for a given host - **misc** contains some required but small roles + - **deb_unstable** enables debian unstable on low priority - **handlers** contains some handlers used by other roles - **system_user** creates a system user - **mysql** defines roles for handling mysql databases and users, uses *MariaDB* diff --git a/roles/misc/deb_unstable/meta/main.yml b/roles/misc/deb_unstable/meta/main.yml new file mode 100644 index 0000000..611d474 --- /dev/null +++ b/roles/misc/deb_unstable/meta/main.yml @@ -0,0 +1,3 @@ +--- + +allow_duplicates: no diff --git a/roles/misc/deb_unstable/tasks/main.yml b/roles/misc/deb_unstable/tasks/main.yml new file mode 100644 index 0000000..26266da --- /dev/null +++ b/roles/misc/deb_unstable/tasks/main.yml @@ -0,0 +1,20 @@ +--- + +- name: Register debian unstable for apt + copy: + dest: "/etc/apt/sources.list.d/unstable.list" + owner: root + group: root + mode: "u=rw,g=r,o=r" + content: "deb http://deb.debian.org/debian/ unstable main" + +- name: Restrict unstable for apt + copy: + dest: "/etc/apt/preferences.d/unstable" + owner: root + group: root + mode: "u=rw,g=r,o=r" + content: | + Package: * + Pin: release a=unstable + Pin-Priority: 90 diff --git a/roles/wireguard/application/meta/main.yml b/roles/wireguard/application/meta/main.yml index 611d474..b0d1c2d 100644 --- a/roles/wireguard/application/meta/main.yml +++ b/roles/wireguard/application/meta/main.yml @@ -1,3 +1,6 @@ --- allow_duplicates: no + +dependencies: + - role: misc/deb_unstable diff --git a/roles/wireguard/application/tasks/main.yml b/roles/wireguard/application/tasks/main.yml index d87907c..c316b26 100644 --- a/roles/wireguard/application/tasks/main.yml +++ b/roles/wireguard/application/tasks/main.yml @@ -1,25 +1,5 @@ --- -# TODO Exclude to own role -- name: Register debian unstable for apt - copy: - dest: "/etc/apt/sources.list.d/unstable.list" - owner: root - group: root - mode: "u=rw,g=r,o=r" - content: "deb http://deb.debian.org/debian/ unstable main" - -- name: Restrict unstable for apt - copy: - dest: "/etc/apt/preferences.d/unstable" - owner: root - group: root - mode: "u=rw,g=r,o=r" - content: | - Package: * - Pin: release a=unstable - Pin-Priority: 90 - - name: Install wireguard using apt apt: name: