silence some more SSH and postscreen messages
[ansible.git] / roles / base / tasks / main.yml
1 # packages
2 - name: check minimal system version
3   when: not (ansible_distribution == "Debian" and ansible_lsb.major_release|int >= 9)
4   command: "false"
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   changed_when: False
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,procmail,fetchmail state=absent autoremove=yes
15 - name: install some basic tools
16   apt: name=nano,aptitude,rsync,git,mercurial,curl,apt-transport-https,psmisc,dnsutils,tree,htop,acl,libpam-systemd,needrestart,reboot-notifier,debian-security-support state=latest
17 # configuration
18 - name: configure root shell
19   copy:
20     dest: /root/{{ item }}
21     remote_src: True
22     src: /etc/skel/{{ item }}
23   loop:
24   - .profile
25   - .bashrc
26   - .bash_logout
27 - name: configure systemd-timesyncd
28   copy:
29     dest: /etc/systemd/timesyncd.conf
30     src: files/timesyncd.conf
31   notify: timesyncd
32 - name: configure needrestart
33   copy:
34     dest: /etc/needrestart/conf.d/restart.conf
35     src: files/needrestart.conf