From 3395b97e49d34a5a10047eeb071c6b781bc1b692 Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Mon, 19 Jul 2021 10:21:55 +0200 Subject: [PATCH] Avoid usage of ansible_lsb to not depend on lsb-release package on Debian --- tasks/pkg-debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/pkg-debian.yml b/tasks/pkg-debian.yml index ce0026b9..25e9f1ee 100644 --- a/tasks/pkg-debian.yml +++ b/tasks/pkg-debian.yml @@ -48,7 +48,7 @@ dest: "{{ datadog_apt_trusted_d_keyring }}" mode: "0644" remote_src: yes - when: ((ansible_distribution == 'Debian' and ansible_lsb.major_release|int < 9) or (ansible_distribution == 'Ubuntu' and ansible_lsb.major_release|int < 16)) and not ansible_check_mode + when: ((ansible_distribution == 'Debian' and ansible_distribution_major_version|int < 9) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int < 16)) and not ansible_check_mode - name: Ensure Datadog non-https repositories and repositories not using signed-by option are deprecated apt_repository: