From ff7f2b618891a59fcca3262fc0a604c22c4ed737 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 30 May 2019 18:18:26 +0200 Subject: [PATCH] keepalived: do not install the PPA on Ubuntu bionic. --- library/roles/keepalived/tasks/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/roles/keepalived/tasks/main.yml b/library/roles/keepalived/tasks/main.yml index ca0d8a79..d0fa892c 100644 --- a/library/roles/keepalived/tasks/main.yml +++ b/library/roles/keepalived/tasks/main.yml @@ -2,10 +2,11 @@ - block: - name: Install the keepalived repository - apt_repository: repo={{ keepalived_repo }} + apt_repository: repo={{ keepalived_repo }} update_cache=yes + when: ansible_distribution_major_version <= '16' - name: Install the keepalived package - apt: name={{ item }} state={{ keepalived_pkg_state }} update_cache=yes + apt: name={{ item }} state={{ keepalived_pkg_state }} update_cache=yes cache_valid_time=1800 with_items: '{{ keepalived_pkgs }}' - name: Install the keepalived configuration