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, } file { '/etc/default/keyboard': ensure => 'absent', } file { '/etc/default/locale': ensure => 'absent', } file { '/etc/timezone': ensure => 'absent', } file { '/etc/pacman.d/mirrorlist.pacnew': ensure => 'absent', } exec { '/usr/bin/reanimate-pacman': creates => '/etc/pacman.d/gnupg', } 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'], } file { '/etc/systemd/system/pacman-reanimation.service': ensure => 'absent', require => File['/etc/pacman.d/gnupg'], } file { '/etc/systemd/system/multi-user.target.wants/pacman-reanimation.service': ensure => 'absent', require => File['/etc/pacman.d/gnupg'], } exec { '/usr/bin/mv /etc/lvm/lvmlocal.conf.pacnew /etc/lvm/lvmlocal.conf': onlyif => '/usr/bin/test -f /etc/lvm/lvmlocal.conf.pacnew' } 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': ensure => 'absent', } exec { '/usr/bin/sed -i -e "s/Name=eth0/Name=en*/" /etc/systemd/network/eth0-dhcp.network': subscribe => File['/etc/udev/rules.d/80-net-setup-link.rules'], refreshonly => true } exec { '/usr/bin/mv /etc/systemd/network/eth0-dhcp.network /etc/systemd/network/en-dhcp.network': subscribe => Exec['/usr/bin/sed -i -e "s/Name=eth0/Name=en*/" /etc/systemd/network/eth0-dhcp.network'], notify => Reboot['after_run'], refreshonly => true, } }