forked from evolix/ansible-roles
116 lines
2.2 KiB
YAML
116 lines
2.2 KiB
YAML
---
|
|
|
|
- name: Install/Update system tools
|
|
apt:
|
|
name: "{{ item }}"
|
|
with_items:
|
|
- locales
|
|
- sudo
|
|
- ntpdate
|
|
- lsb-release
|
|
- dnsutils
|
|
- pv
|
|
- apg
|
|
- conntrack
|
|
- logrotate
|
|
- bash-completion
|
|
- ssl-cert
|
|
- ca-certificates
|
|
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: Be sure that openntpd package is absent/purged
|
|
apt:
|
|
name: openntpd
|
|
state: absent
|
|
purge: yes
|
|
when: evolinux_packages_purge_openntpd
|
|
|
|
- name: Install/Update packages for Stretch and later
|
|
apt:
|
|
name: "{{ item }}"
|
|
with_items:
|
|
- net-tools
|
|
when:
|
|
- evolinux_packages_stretch
|
|
- ansible_distribution_major_version | version_compare('9', '>=')
|
|
|
|
- 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: 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
|
|
- ansible_distribution_release == "jessie"
|
|
|
|
- meta: flush_handlers
|