]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
OVH cleanup continue (network interfaces)
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 8 Aug 2016 18:52:34 +0000 (20:52 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 8 Aug 2016 19:16:51 +0000 (21:16 +0200)
.gitmodules
manifests/site.pp
modules/ovh_cleanup/manifests/init.pp
modules/reboot [new submodule]

index e090332bd13e473023a3560faf75ed8dd63dfcfe..6792f860e969c6c264aec670048d6ff0042ae980 100644 (file)
@@ -1,3 +1,6 @@
 [submodule "modules/stdlib"]
        path = modules/stdlib
        url = https://github.com/puppetlabs/puppetlabs-stdlib.git
+[submodule "modules/reboot"]
+       path = modules/reboot
+       url = https://github.com/puppetlabs/puppetlabs-reboot.git
index d8c98433781651ac523238c909ea39aa36c1e1f7..cd2063adf72d6a5aa7366a8bdad9eb89189d83fe 100644 (file)
@@ -1,7 +1,12 @@
 node default {
     include stdlib
+
     class { 'ovh_cleanup': }
     class { 'locales': }
     class { 'base_packages': }
     class { 'cron_puppet': }
+
+    reboot { 'after_run':
+      apply => 'finished'
+    }
 }
index 75b497815ddab05f8d3509262af8fcd258c1841f..0704cf97bc868b24dadbd3a9d90b5f3873a3146e 100644 (file)
@@ -39,4 +39,18 @@ class ovh_cleanup {
     file { '/etc/resolv.conf.pacorig':
       ensure => 'absent'
     }
+
+
+    file { '/etc/udev/rules.d/80-net-setup-link.rules':
+      ensure => 'absent',
+    }
+    exec { '/usr/bin/sed -i -e "s/Name=eth0/Name=en*/" /etc/systemd/network/eth0-dhcp.network':
+      subscribe   => File['/etc/udev/rules.d/80-net-setup-link.rules'],
+      refreshonly => true
+    }
+    exec { '/usr/bin/mv /etc/systemd/network/eth0-dhcp.network /etc/systemd/network/en-dhcp.network':
+      subscribe   => Exec['/usr/bin/sed -i -e "s/Name=eth0/Name=en*/" /etc/systemd/network/eth0-dhcp.network'],
+      notify      => Reboot['after_run'],
+      refreshonly => true,
+    }
 }
diff --git a/modules/reboot b/modules/reboot
new file mode 160000 (submodule)
index 0000000..a9b48a7
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit a9b48a7325130c4ab19cbfe2de1d12b7cbbae711