From: Ralf Jung Date: Sat, 7 Apr 2018 18:20:06 +0000 (+0200) Subject: check if we are on a supported distro X-Git-Url: https://git.ralfj.de/ansible.git/commitdiff_plain/e7816cd8c14be0d169f401b2669407cb2d586157 check if we are on a supported distro --- diff --git a/base.yml b/base.yml index 7f03b5b..2a7c824 100644 --- a/base.yml +++ b/base.yml @@ -2,6 +2,9 @@ - hosts: all tasks: # packages + - name: check minimal system version + command: "false" + when: not (ansible_distribution == "Debian" and ansible_lsb.major_release|int >= 9) - name: detect if we have backports in the sources.list command: fgrep backports /etc/apt/sources.list register: backports @@ -11,7 +14,7 @@ when: backports.rc != 0 - name: get rid of packages we do not want apt: name=exim4-base,rpcbind state=absent autoremove=yes - - name: install latest version of some packages, coming from backports if possible + - name: install needrestart, git apt: name=needrestart,git state=latest default_release={{ansible_distribution_release}}-backports # server-scripts - name: clone server-scripts git repository