diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-08-24 02:22:17 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-08-29 22:46:14 +0200 |
commit | 7fed35a408b9ec37454169425823785b5fc8978b (patch) | |
tree | 28371d43ac304f99fb0a5305124858db69ef2137 /modules/ovh_cleanup | |
parent | ba2cf1b5d938810077b0fd73844faf432e8e8f9d (diff) | |
download | Puppet-7fed35a408b9ec37454169425823785b5fc8978b.tar.gz Puppet-7fed35a408b9ec37454169425823785b5fc8978b.tar.zst Puppet-7fed35a408b9ec37454169425823785b5fc8978b.zip |
Refactor base installation module
Diffstat (limited to 'modules/ovh_cleanup')
-rw-r--r-- | modules/ovh_cleanup/manifests/init.pp | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/modules/ovh_cleanup/manifests/init.pp b/modules/ovh_cleanup/manifests/init.pp deleted file mode 100644 index fc1b84b..0000000 --- a/modules/ovh_cleanup/manifests/init.pp +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | class ovh_cleanup { | ||
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 | } | ||
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 | } | ||
32 | file { '/usr/bin/growpart': | ||
33 | ensure => 'absent', | ||
34 | } | ||
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 | } | ||
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 | } | ||
53 | package { 'haveged': | ||
54 | ensure => 'absent', | ||
55 | uninstall_options => [ '-s', '-c'] | ||
56 | } | ||
57 | package { 'parted': | ||
58 | ensure => 'absent', | ||
59 | uninstall_options => [ '-s', '-c'] | ||
60 | } | ||
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 | } | ||
75 | } | ||