From 70473c2de728f7bffb99b66fedf75e07a66d41fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 8 Aug 2016 23:39:35 +0200 Subject: [PATCH] Add 'backups' for ovh cleanup --- modules/ovh_cleanup/manifests/init.pp | 8 ++++++++ 1 file changed, 8 insertions(+) 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, -- 2.41.0