]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
OVH cleanup with puppet
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 8 Aug 2016 17:06:02 +0000 (19:06 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 8 Aug 2016 17:14:38 +0000 (19:14 +0200)
manifests/site.pp
modules/ovh_cleanup/manifests/init.pp [new file with mode: 0644]

index a37c69c6078fa8821b533594e10c15e9582f0a34..45b7c010576dc4f850ae0a603ea31e6cb5208efc 100644 (file)
@@ -1,4 +1,5 @@
 node default {
+    class { 'ovh_cleanup': }
     class { 'base_packages': }
     class { 'cron_puppet': }
 }
diff --git a/modules/ovh_cleanup/manifests/init.pp b/modules/ovh_cleanup/manifests/init.pp
new file mode 100644 (file)
index 0000000..de16cb4
--- /dev/null
@@ -0,0 +1,36 @@
+class ovh_cleanup {
+    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/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'],
+    }
+}