aboutsummaryrefslogtreecommitdiffstats
path: root/roles/debian/tasks
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2020-02-27 17:50:43 +0100
committerEmil Renner Berthing <esmil@labitat.dk>2020-02-27 17:50:45 +0100
commit4c4ec997ff50631fb83d6772b3e349bd9bf784b3 (patch)
tree179e6f57f61a938d7e04228aa4aa4768a55738ee /roles/debian/tasks
parentd26fe55aa9de5f0eb51152c22d12ff28a9c488d4 (diff)
downloadlabitat-ansible-4c4ec997ff50631fb83d6772b3e349bd9bf784b3.tar.gz
labitat-ansible-4c4ec997ff50631fb83d6772b3e349bd9bf784b3.tar.xz
labitat-ansible-4c4ec997ff50631fb83d6772b3e349bd9bf784b3.zip
debian: streamline use of apt_release variable
..and ansible_distribution_release fact.
Diffstat (limited to 'roles/debian/tasks')
-rw-r--r--roles/debian/tasks/networkd.yml4
1 files changed, 2 insertions, 2 deletions
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']