2 - name: check minimal system version
3 when: not (ansible_distribution == "Debian" and ansible_lsb.major_release|int >= 9)
5 - name: detect if we have backports in the sources.list
6 command: fgrep backports /etc/apt/sources.list
8 failed_when: backports.rc == 2
10 - name: add backports repository
11 when: backports.rc != 0
12 apt_repository: repo='deb http://httpredir.debian.org/debian {{ansible_distribution_release}}-backports main contrib non-free' state=present update_cache=yes
13 - name: get rid of packages we do not want
14 apt: name=exim4-base,rpcbind state=absent autoremove=yes
15 - name: install needrestart (from backports)
16 apt: name=needrestart state=latest default_release={{ansible_distribution_release}}-backports
17 - name: install some basic tools
18 apt: name=aptitude,rsync,git,mercurial,curl,apt-transport-https,psmisc,dnsutils,tree,htop state=latest
20 - name: create dh2048 file
21 command: openssl dhparam -out /etc/ssl/dh2048.pem 2048
23 creates: "/etc/ssl/dh2048.pem"
25 - name: configure root shell
27 dest: /root/{{ item }}
29 src: /etc/skel/{{ item }}
34 - name: configure systemd-timesyncd
36 dest: /etc/systemd/timesyncd.conf
37 src: files/timesyncd.conf