Create seperate playbook to clean BCFG2 stuff
							parent
							
								
									2f577d4339
								
							
						
					
					
						commit
						8df804feea
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			@ -25,7 +25,6 @@
 | 
			
		|||
      # - irqbalance  # distribute interrupts on multicores CPU
 | 
			
		||||
      - vlock  # virtual console lock
 | 
			
		||||
      - resolvconf  # for dns configuration in network interfaces
 | 
			
		||||
      - gpg  # for apt keys
 | 
			
		||||
  register: apt_result
 | 
			
		||||
  retries: 3
 | 
			
		||||
  until: apt_result is succeeded
 | 
			
		||||
| 
						 | 
				
			
			@ -34,13 +33,10 @@
 | 
			
		|||
  apt:
 | 
			
		||||
    state: absent
 | 
			
		||||
    name:
 | 
			
		||||
      - ramond  # remplaced by ra-guard on switchs
 | 
			
		||||
      - collectd-utils  # old monitoring
 | 
			
		||||
      - collectd
 | 
			
		||||
      # - munin-node  # old monitoring
 | 
			
		||||
      - arpwatch  # old sniffing
 | 
			
		||||
      - python3-reportbug
 | 
			
		||||
      - doc-debian  # graphical
 | 
			
		||||
      - debian-faq  # graphical
 | 
			
		||||
      - os-prober  # makes grub-install lag
 | 
			
		||||
      - python3-reportbug
 | 
			
		||||
  register: apt_result
 | 
			
		||||
  retries: 3
 | 
			
		||||
  until: apt_result is succeeded
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,9 @@
 | 
			
		|||
---
 | 
			
		||||
- name: Install APT HTTPS support
 | 
			
		||||
  apt:
 | 
			
		||||
    name: apt-transport-https
 | 
			
		||||
    name:
 | 
			
		||||
      - apt-transport-https
 | 
			
		||||
      - gpg
 | 
			
		||||
    state: present
 | 
			
		||||
    update_cache: true
 | 
			
		||||
  register: apt_result
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue