ansible-roles/evolinux-base/tasks/packages.yml

147 lines
3 KiB
YAML
Raw Normal View History

2016-12-21 14:55:20 +01:00
---
- name: Install/Update system tools
apt:
2019-12-31 15:25:10 +01:00
name:
- locales
- sudo
- ntpdate
- lsb-release
- dnsutils
- pv
- apg
- conntrack
- logrotate
- bash-completion
- ssl-cert
- ca-certificates
- rename
when: evolinux_packages_system
2016-12-21 14:55:20 +01:00
- name: Install/Update diagnostic tools
apt:
2019-12-31 15:25:10 +01:00
name:
- strace
- htop
- iftop
- iptraf
- ncdu
- iotop
- tcpdump
- mtr-tiny
- curl
- telnet
- traceroute
- man
when: evolinux_packages_diagnostic
2016-12-21 14:55:20 +01:00
- name: Install/Update hardware tools
apt:
2019-12-31 15:25:10 +01:00
name:
- hdparm
- smartmontools
- lm-sensors
when: evolinux_packages_hardware
2016-12-21 14:55:20 +01:00
- name: Install/Update common tools
apt:
2019-12-31 15:25:10 +01:00
name:
- vim
- screen
- tmux
- mutt
- tree
- git
- subversion
- rsync
- bc
- pinentry-curses
- ncurses-term
when: evolinux_packages_common
2016-12-21 14:55:20 +01:00
2017-07-17 16:17:32 +02:00
- name: Be sure that openntpd package is absent/purged
apt:
name: openntpd
state: absent
purge: True
2017-07-17 16:17:32 +02:00
when: evolinux_packages_purge_openntpd
- name: the chrony package is absent
apt:
name: chrony
purge: True
state: absent
when: evolinux_packages_purge_chrony
- name: Be sure locate/mlocate is absent/purged
apt:
2019-12-31 15:25:10 +01:00
name:
- locate
- mlocate
state: absent
purge: yes
when: evolinux_packages_purge_locate
- name: Install/Update serveur-base meta-package
apt:
name: serveur-base
allow_unauthenticated: yes
when: evolinux_packages_serveur_base
2017-07-11 18:40:05 +02:00
- name: Install/Update packages for Stretch and later
apt:
2019-12-31 15:25:10 +01:00
name: net-tools
2017-07-11 18:40:05 +02:00
when:
2019-12-31 15:25:10 +01:00
- evolinux_packages_stretch
- ansible_distribution_major_version is version('9', '>=')
2017-07-11 18:40:05 +02:00
- name: Install/Update packages for Buster and later
apt:
2019-12-31 15:25:10 +01:00
name:
- spectre-meltdown-checker
- binutils
when:
2019-12-31 15:25:10 +01:00
- evolinux_packages_buster
- ansible_distribution_major_version is version('10', '>=')
2017-03-30 15:32:59 +02:00
- 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
2018-12-19 15:58:47 +01:00
- name: Deleting rpcbind and nfs-common
2016-12-21 14:55:20 +01:00
apt:
2019-12-31 15:25:10 +01:00
name:
- rpcbind
- nfs-common
2016-12-21 14:55:20 +01:00
state: absent
when: evolinux_packages_delete_nfs
# TODO: use ini_file when Ansible > 2.1 (no_extra_spaces: yes)
- name: Configure Listchanges on Jessie
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 == "Debian"
- ansible_distribution_release == "jessie"
- name: apt-listchanges is absent on Stretch and later
apt:
name: apt-listchanges
state: absent
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version is version('9', '>=')
- meta: flush_handlers