ansible-roles/evolinux-base/tasks/packages.yml
Jérémy Lecour 23f0b97897 evolinux-base: add logrotate package
It should be installed by default, but make sure that it is really
present.
2017-05-18 13:57:30 +02:00

110 lines
2 KiB
YAML

---
- name: Install/Update system tools
apt:
name: "{{ item }}"
with_items:
- locales
- sudo
- ntp
- ntpdate
- lsb-release
- dnsutils
- pv
- apg
- conntrack
- logrotate
when: evolinux_packages_system
- name: Install/Update diagnostic tools
apt:
name: "{{ item }}"
with_items:
- strace
- htop
- iftop
- iptraf
- ncdu
- iotop
- tcpdump
- mtr-tiny
- curl
- telnet
when: evolinux_packages_diagnostic
- name: Install/Update hardware tools
apt:
name: "{{ item }}"
with_items:
- hdparm
- smartmontools
- lm-sensors
when: evolinux_packages_hardware
- name: Install/Update common tools
apt:
name: "{{ item }}"
with_items:
- vim
- screen
- tmux
- mutt
- tree
- git
- subversion
- rsync
- bc
- pinentry-curses
when: evolinux_packages_common
- name: Install/Update serveur-base meta-package
apt:
name: serveur-base
allow_unauthenticated: yes
when: evolinux_packages_serveur_base
- name: Customize logcheck recipient
lineinfile:
dest: /etc/logcheck/logcheck.conf
regexp: '^SENDMAILTO=".*"$'
line: 'SENDMAILTO="{{ logcheck_alert_email or general_alert_email | mandatory }}"'
when: evolinux_packages_logcheck_recipient
- name: is an MTA installed?
command: "dpkg -S /usr/sbin/sendmail"
check_mode: no
register: mta_installed
failed_when: False
changed_when: False
- name: Install lsb-invalid-mta
apt:
name: lsb-invalid-mta
when: evolinux_packages_invalid_mta and mta_installed.rc != 0
- name: Deleting rpcbin and nfs-common
apt:
name: "{{ item }}"
state: absent
with_items:
- rpcbind
- nfs-common
when: evolinux_packages_delete_nfs
# TODO: use ini_file when Ansible > 2.1 (no_extra_spaces: yes)
- name: Configure Listchanges
lineinfile:
dest: /etc/apt/listchanges.conf
regexp: '^{{ item.option }}\s*='
line: "{{ item.option }}={{ item.value }}"
with_items:
- { option: "confirm", value: "1" }
- { option: "which", value: "both" }
when: evolinux_packages_listchanges
- meta: flush_handlers