90 lines
2.6 KiB
YAML
Executable File
90 lines
2.6 KiB
YAML
Executable File
#!/usr/bin/env ansible-playbook
|
|
---
|
|
# This is a special playbook to clean old stuff from BCFG2
|
|
# it will disapear when BCFG2 will disapear
|
|
# `apt-mark showmanual` is a good start
|
|
- hosts: server,test_vm
|
|
tasks:
|
|
- name: Clean up unused packages
|
|
apt:
|
|
state: absent
|
|
name:
|
|
- arpwatch # old sniffing
|
|
- collectd
|
|
- collectd-utils # old monitoring
|
|
- doc-debian # graphical
|
|
- debian-faq # graphical
|
|
- icinga2
|
|
- icinga2-node # old monitoring
|
|
- icinga2-ido-pgsql
|
|
- icinga2-common
|
|
- icinga2-bin
|
|
- munin # old monitoring
|
|
- munin-node # old monitoring
|
|
- munin-common
|
|
- munin-plugins-core
|
|
- munin-plugins-extra
|
|
- monitoring-plugins
|
|
- monitoring-plugins-standard
|
|
- monitoring-plugins-basic
|
|
- monitoring-plugins-common
|
|
- libmonitoring-plugin-perl
|
|
- snmp
|
|
- nagios-plugins-contrib
|
|
- nagios-nrpe-server
|
|
- python-nagiosplugin
|
|
- python3-nagiosplugin
|
|
- os-prober # makes grub-install lag
|
|
- python3-reportbug
|
|
- popularity-contest
|
|
- ramond # remplaced by ra-guard on switchs
|
|
- sysstat # very old monitoring
|
|
- irqbalance # removed in newer debian
|
|
- apt-dater-host
|
|
register: apt_result
|
|
retries: 3
|
|
until: apt_result is succeeded
|
|
|
|
- name: Clean unwanted olderstuff
|
|
apt:
|
|
autoremove: true
|
|
purge: true
|
|
register: apt_result
|
|
retries: 3
|
|
until: apt_result is succeeded
|
|
|
|
- name: Remove old conf
|
|
file:
|
|
path: "{{ item }}"
|
|
state: absent
|
|
loop:
|
|
- /etc/cron.d/munin-crans
|
|
- /etc/cron.d/munin-node
|
|
- /etc/cron.d/munin-node.dpkg-dist
|
|
- /etc/cron.d/monit
|
|
- /etc/cron.d/sshFingerprint
|
|
- /etc/cron.d/printer_watch
|
|
- /etc/cron.d/comptes_inactifs
|
|
- /etc/cron.d/pxeboot
|
|
- /etc/cron.d/re2o-services
|
|
- /etc/cron.d/autobcfg2
|
|
- /etc/cron.d/bcfg2-run
|
|
- /etc/cron.d/pull-repos-scripts
|
|
- /etc/munin
|
|
- /etc/icinga2
|
|
- /etc/nut
|
|
- /etc/nginx/sites-enabled/status
|
|
- /etc/nginx/sites-available/status
|
|
- /var/local/aptdater
|
|
- /etc/apt-dater-host.conf
|
|
- /etc/sudoers.d/apt-dater-host
|
|
|
|
# - name: Upgrade
|
|
# apt:
|
|
# upgrade: dist
|
|
# update_cache: true
|
|
# cache_valid_time: 86400 # one day
|
|
# register: apt_result
|
|
# retries: 3
|
|
# until: apt_result is succeeded
|