From bd18c309549aca9a85766949377431b256dac6fd Mon Sep 17 00:00:00 2001 From: binary Date: Thu, 11 Mar 2021 15:47:25 +0100 Subject: Use ansible distribution for freebsd specific tasks. --- roles/wireguard/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/wireguard/tasks/main.yml b/roles/wireguard/tasks/main.yml index 26dfbf6..9875457 100644 --- a/roles/wireguard/tasks/main.yml +++ b/roles/wireguard/tasks/main.yml @@ -59,14 +59,14 @@ path: /etc/rc.conf regexp: "^wireguard_enable" line: wireguard_enable="YES" - when: os_distribution == "freebsd" + when: ansible_distribution == "FreeBSD" - name: enable interface for freebsd lineinfile: path: /etc/rc.conf regexp: "^wireguard_interfaces" line: wireguard_interfaces="{{ global.dcontroller }}" - when: os_distribution == "freebsd" + when: ansible_distribution == "FreeBSd" - name: generate and enable init script include_role: name=rc @@ -76,7 +76,7 @@ rc_name: wireguard rc_user: "{{ user_root }}" ignore_errors: true - when: os_distribution != "freebsd" + when: ansible_distribution != "FreeBSD" - name: generate server interface template: -- cgit v1.2.3