From: Ismaƫl Bouya Date: Mon, 8 Aug 2016 21:39:35 +0000 (+0200) Subject: Add 'backups' for ovh cleanup X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=70473c2de728f7bffb99b66fedf75e07a66d41fa;p=perso%2FImmae%2FProjets%2FPuppet.git Add 'backups' for ovh cleanup --- diff --git a/modules/ovh_cleanup/manifests/init.pp b/modules/ovh_cleanup/manifests/init.pp index b7ecb50..fc1b84b 100644 --- a/modules/ovh_cleanup/manifests/init.pp +++ b/modules/ovh_cleanup/manifests/init.pp @@ -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,