]>
Commit | Line | Data |
---|---|---|
943107e9 | 1 | class ovh_cleanup { |
70473c2d IB |
2 | exec { 'bash -c "comm -23 <(find /etc /opt /usr | sort) <(pacman -Qlq | sed \"s|/$||\" | sort) > /root/disowned_files_before_cleanup.txt"': |
3 | path => '/usr/bin', | |
4 | creates => '/root/disowned_files_before_cleanup.txt' | |
5 | } | |
6 | 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"': | |
7 | path => '/usr/bin', | |
8 | creates => '/root/packages_not_in_base_group.txt' | |
9 | } | |
943107e9 IB |
10 | file { '/etc/apt': |
11 | ensure => 'absent', | |
12 | force => true, | |
13 | } | |
14 | file { '/etc/default/keyboard': | |
15 | ensure => 'absent', | |
16 | } | |
17 | file { '/etc/default/locale': | |
18 | ensure => 'absent', | |
19 | } | |
20 | file { '/etc/timezone': | |
21 | ensure => 'absent', | |
22 | } | |
23 | file { '/etc/pacman.d/mirrorlist.pacnew': | |
24 | ensure => 'absent', | |
25 | } | |
26 | exec { '/usr/bin/reanimate-pacman': | |
27 | creates => '/etc/pacman.d/gnupg', | |
28 | } | |
29 | file { '/etc/pacman.d/gnupg': | |
30 | ensure => 'present', | |
31 | } | |
66e7b1e6 IB |
32 | file { '/usr/bin/growpart': |
33 | ensure => 'absent', | |
34 | } | |
943107e9 IB |
35 | file { '/usr/bin/reanimate-pacman': |
36 | ensure => 'absent', | |
37 | require => File['/etc/pacman.d/gnupg'], | |
38 | } | |
39 | file { '/etc/systemd/system/pacman-reanimation.service': | |
40 | ensure => 'absent', | |
41 | require => File['/etc/pacman.d/gnupg'], | |
42 | } | |
43 | file { '/etc/systemd/system/multi-user.target.wants/pacman-reanimation.service': | |
44 | ensure => 'absent', | |
45 | require => File['/etc/pacman.d/gnupg'], | |
46 | } | |
272919cb IB |
47 | exec { '/usr/bin/mv /etc/lvm/lvmlocal.conf.pacnew /etc/lvm/lvmlocal.conf': |
48 | onlyif => '/usr/bin/test -f /etc/lvm/lvmlocal.conf.pacnew' | |
49 | } | |
50 | file { '/etc/resolv.conf.pacorig': | |
51 | ensure => 'absent' | |
52 | } | |
66e7b1e6 IB |
53 | package { 'haveged': |
54 | ensure => 'absent', | |
55 | uninstall_options => [ '-s', '-c'] | |
56 | } | |
57 | package { 'parted': | |
58 | ensure => 'absent', | |
59 | uninstall_options => [ '-s', '-c'] | |
60 | } | |
0e0ea472 IB |
61 | |
62 | ||
63 | file { '/etc/udev/rules.d/80-net-setup-link.rules': | |
64 | ensure => 'absent', | |
65 | } | |
66 | exec { '/usr/bin/sed -i -e "s/Name=eth0/Name=en*/" /etc/systemd/network/eth0-dhcp.network': | |
67 | subscribe => File['/etc/udev/rules.d/80-net-setup-link.rules'], | |
68 | refreshonly => true | |
69 | } | |
70 | exec { '/usr/bin/mv /etc/systemd/network/eth0-dhcp.network /etc/systemd/network/en-dhcp.network': | |
71 | subscribe => Exec['/usr/bin/sed -i -e "s/Name=eth0/Name=en*/" /etc/systemd/network/eth0-dhcp.network'], | |
72 | notify => Reboot['after_run'], | |
73 | refreshonly => true, | |
74 | } | |
943107e9 | 75 | } |