fix postscreen and DKIM permissions
[ansible.git] / base.yml
1 # basic system preparation
2 - hosts: all
3   tasks:
4   # packages
5   - name: check minimal system version
6     command: "false"
7     when: not (ansible_distribution == "Debian" and ansible_lsb.major_release|int >= 9)
8   - name: detect if we have backports in the sources.list
9     command: fgrep backports /etc/apt/sources.list
10     register: backports
11     failed_when: backports.rc == 2
12   - name: add backports repository
13     apt_repository: repo='deb http://httpredir.debian.org/debian {{ansible_distribution_release}}-backports main contrib non-free' state=present update_cache=yes
14     when: backports.rc != 0
15   - name: get rid of packages we do not want
16     apt: name=exim4-base,rpcbind state=absent autoremove=yes
17   - name: install needrestart (from backports)
18     apt: name=needrestart state=latest default_release={{ansible_distribution_release}}-backports
19   - name: install aptitude, rsync, git
20     apt: name=aptitude,rsync,git state=latest
21   # server-scripts
22   - name: clone server-scripts git repository
23     git:
24       dest: /root/server-scripts
25       repo: 'git://ralfj.de/server-scripts'
26       version: 07d301fd8adeaf8ad40591a418da394ad37816ce