From 4c4ec997ff50631fb83d6772b3e349bd9bf784b3 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Thu, 27 Feb 2020 17:50:43 +0100 Subject: debian: streamline use of apt_release variable ..and ansible_distribution_release fact. --- roles/debian/tasks/networkd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/debian/tasks/networkd.yml') diff --git a/roles/debian/tasks/networkd.yml b/roles/debian/tasks/networkd.yml index 084a844..074992a 100644 --- a/roles/debian/tasks/networkd.yml +++ b/roles/debian/tasks/networkd.yml @@ -32,10 +32,10 @@ name: systemd-networkd-wait-online.service enabled: "{{ use_networkd|ternary('yes','no') }}" masked: no - when: ansible_distribution_release == 'stretch' and not chroot + when: apt_release|default(ansible_distribution_release) == 'stretch' and not chroot - name: '- when in chroot' command: "systemctl {{ use_networkd|ternary('enable','disable') }} systemd-networkd-wait-online.service" - when: ansible_distribution_release == 'stretch' and chroot|bool + when: apt_release|default(ansible_distribution_release) == 'stretch' and chroot|bool # use RequiredForOnline in systemd.network files if possible, # but for older systemd's set networkd_ignore: ['eth0', 'eth1'] -- cgit v1.2.1