Create seperate playbook to clean BCFG2 stuff

certbot_on_virtu
Alexandre Iooss 2019-12-07 16:59:38 +01:00
parent 2f577d4339
commit 8df804feea
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
3 changed files with 64 additions and 8 deletions

58
clean_servers.yml 100644
View File

@ -0,0 +1,58 @@
---
# This is a special playbook to clean old stuff from BCFG2
# it will disapear when BCFG2 will disapear
- hosts: server
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
- munin # old monitoring
- munin-node # old monitoring
- munin-plugins-core
- munin-plugins-extra
- monitoring-plugins
- libmonitoring-plugin-perl
- nagios-plugins-contrib
- python-nagiosplugin
- python3-nagiosplugin
- os-prober # makes grub-install lag
- python3-reportbug
- ramond # remplaced by ra-guard on switchs
- rrdcached # old monitoring
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Clean unwanted olderstuff
apt:
autoremove: yes
purge: yes
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
# - name: Upgrade
# apt:
# upgrade: dist
# update_cache: true
# cache_valid_time: 86400 # one day
# register: apt_result
# retries: 3
# until: apt_result is succeeded

View File

@ -25,7 +25,6 @@
# - irqbalance # distribute interrupts on multicores CPU # - irqbalance # distribute interrupts on multicores CPU
- vlock # virtual console lock - vlock # virtual console lock
- resolvconf # for dns configuration in network interfaces - resolvconf # for dns configuration in network interfaces
- gpg # for apt keys
register: apt_result register: apt_result
retries: 3 retries: 3
until: apt_result is succeeded until: apt_result is succeeded
@ -34,13 +33,10 @@
apt: apt:
state: absent state: absent
name: name:
- ramond # remplaced by ra-guard on switchs - doc-debian # graphical
- collectd-utils # old monitoring - debian-faq # graphical
- collectd
# - munin-node # old monitoring
- arpwatch # old sniffing
- python3-reportbug
- os-prober # makes grub-install lag - os-prober # makes grub-install lag
- python3-reportbug
register: apt_result register: apt_result
retries: 3 retries: 3
until: apt_result is succeeded until: apt_result is succeeded

View File

@ -1,7 +1,9 @@
--- ---
- name: Install APT HTTPS support - name: Install APT HTTPS support
apt: apt:
name: apt-transport-https name:
- apt-transport-https
- gpg
state: present state: present
update_cache: true update_cache: true
register: apt_result register: apt_result