]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/ovh_cleanup/manifests/init.pp
Install OVH vps from scratch
[perso/Immae/Projets/Puppet.git] / modules / ovh_cleanup / manifests / init.pp
index 0704cf97bc868b24dadbd3a9d90b5f3873a3146e..fc1b84b308696124ebef0d3e1524c4b8c3fcbbf3 100644 (file)
@@ -1,4 +1,12 @@
 class ovh_cleanup {
+    exec { 'bash -c "comm -23 <(find /etc /opt /usr | sort) <(pacman -Qlq | sed \"s|/$||\" | sort) > /root/disowned_files_before_cleanup.txt"':
+      path    => '/usr/bin',
+      creates => '/root/disowned_files_before_cleanup.txt'
+    }
+    exec { 'bash -c "comm -23 <(pacman -Qq | sort) <(pacman -Qgq base | while read i; do pactree -u \$i; done | sort | uniq) > /root/packages_not_in_base_group.txt"':
+      path    => '/usr/bin',
+      creates => '/root/packages_not_in_base_group.txt'
+    }
     file { '/etc/apt':
       ensure => 'absent',
       force  => true,
@@ -21,6 +29,9 @@ class ovh_cleanup {
     file { '/etc/pacman.d/gnupg':
       ensure => 'present',
     }
+    file { '/usr/bin/growpart':
+      ensure  => 'absent',
+    }
     file { '/usr/bin/reanimate-pacman':
       ensure  => 'absent',
       require => File['/etc/pacman.d/gnupg'],
@@ -39,6 +50,14 @@ class ovh_cleanup {
     file { '/etc/resolv.conf.pacorig':
       ensure => 'absent'
     }
+    package { 'haveged':
+      ensure => 'absent',
+      uninstall_options => [ '-s', '-c']
+    }
+    package { 'parted':
+      ensure => 'absent',
+      uninstall_options => [ '-s', '-c']
+    }
 
 
     file { '/etc/udev/rules.d/80-net-setup-link.rules':