7f03b5b040f519b809d2c86517078097108b340f
[ansible.git] / base.yml
1 # basic system preparation
2 - hosts: all
3   tasks:
4   # packages
5   - name: detect if we have backports in the sources.list
6     command: fgrep backports /etc/apt/sources.list
7     register: backports
8     failed_when: backports.rc == 2
9   - name: add backports repository
10     apt_repository: repo='deb http://httpredir.debian.org/debian {{ansible_distribution_release}}-backports main contrib non-free' state=present update_cache=yes
11     when: backports.rc != 0
12   - name: get rid of packages we do not want
13     apt: name=exim4-base,rpcbind state=absent autoremove=yes
14   - name: install latest version of some packages, coming from backports if possible
15     apt: name=needrestart,git state=latest default_release={{ansible_distribution_release}}-backports
16   # server-scripts
17   - name: clone server-scripts git repository
18     git:
19       repo: 'git://ralfj.de/server-scripts'
20       dest: /root/server-scripts