diff options
-rw-r--r-- | roles/debian/defaults/main.yml | 8 | ||||
-rw-r--r-- | roles/debian/tasks/networkd.yml | 4 | ||||
-rw-r--r-- | roles/raspbian/vars/main.yml | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/roles/debian/defaults/main.yml b/roles/debian/defaults/main.yml index a0708c2..9a548e3 100644 --- a/roles/debian/defaults/main.yml +++ b/roles/debian/defaults/main.yml @@ -34,16 +34,16 @@ apt_preferences_role: {} apt_repos_default: base: uri: 'https://deb.debian.org/debian' - suite: '{{ apt_release is defined|ternary(apt_release,ansible_distribution_release) }}' + suite: '{{ apt_release|default(ansible_distribution_release) }}' security: uri: 'https://deb.debian.org/debian-security' - suite: '{{ apt_release is defined|ternary(apt_release,ansible_distribution_release) }}/updates' + suite: '{{ apt_release|default(ansible_distribution_release) }}/updates' updates: uri: 'https://deb.debian.org/debian' - suite: '{{ apt_release is defined|ternary(apt_release,ansible_distribution_release) }}-updates' + suite: '{{ apt_release|default(ansible_distribution_release) }}-updates' backports: uri: 'https://deb.debian.org/debian' - suite: '{{ apt_release is defined|ternary(apt_release,ansible_distribution_release) }}-backports' + suite: '{{ apt_release|default(ansible_distribution_release) }}-backports' apt_repos_role: {} apt_sources_default: {} 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'] diff --git a/roles/raspbian/vars/main.yml b/roles/raspbian/vars/main.yml index fb95833..bd8f6fc 100644 --- a/roles/raspbian/vars/main.yml +++ b/roles/raspbian/vars/main.yml @@ -10,7 +10,7 @@ apt_repos_default: raspbian: # doesn't support https, psh uri: 'http://raspbian.raspberrypi.org/raspbian' - suite: '{{ ansible_distribution_release }}' + suite: '{{ apt_release|default(ansible_distribution_release) }}' apt_packages_default: # copied from debian role |