From ba2cf1b5d938810077b0fd73844faf432e8e8f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 14 Aug 2017 19:02:29 +0200 Subject: Install OVH vps from scratch --- modules/grub_install/files/config | 47 ++++++++++++++++++++++++++++++++++ modules/grub_install/manifests/init.pp | 32 +++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 modules/grub_install/files/config create mode 100644 modules/grub_install/manifests/init.pp (limited to 'modules/grub_install') diff --git a/modules/grub_install/files/config b/modules/grub_install/files/config new file mode 100644 index 0000000..0a2ef57 --- /dev/null +++ b/modules/grub_install/files/config @@ -0,0 +1,47 @@ +GRUB_DEFAULT=0 +GRUB_TIMEOUT=5 +GRUB_DISTRIBUTOR="Arch" +GRUB_CMDLINE_LINUX_DEFAULT="quiet" +GRUB_CMDLINE_LINUX=" console=tty0 console=ttyS0,115200" + +# Preload both GPT and MBR modules so that they are not missed +GRUB_PRELOAD_MODULES="part_gpt part_msdos" + +# Uncomment to enable Hidden Menu, and optionally hide the timeout count +#GRUB_HIDDEN_TIMEOUT=5 +#GRUB_HIDDEN_TIMEOUT_QUIET=true + +# Uncomment to use basic console +GRUB_TERMINAL_INPUT=console + +# Uncomment to disable graphical terminal +#GRUB_TERMINAL_OUTPUT=console + +# The resolution used on graphical terminal +# note that you can use only modes which your graphic card supports via VBE +# you can see them in real GRUB with the command `vbeinfo' +GRUB_GFXMODE=auto + +# Uncomment to allow the kernel use the same resolution used by grub +GRUB_GFXPAYLOAD_LINUX=keep + +# Uncomment if you want GRUB to pass to the Linux kernel the old parameter +# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" +#GRUB_DISABLE_LINUX_UUID=true + +# Uncomment to disable generation of recovery mode menu entries +GRUB_DISABLE_RECOVERY=true + +# Uncomment and set to the desired menu colors. Used by normal and wallpaper +# modes only. Entries specified as foreground/background. +#GRUB_COLOR_NORMAL="light-blue/black" +#GRUB_COLOR_HIGHLIGHT="light-cyan/blue" + +# Uncomment one of them for the gfx desired, a image background or a gfxtheme +#GRUB_BACKGROUND="/path/to/wallpaper" +#GRUB_THEME="/path/to/gfxtheme" + +# Uncomment to get a beep at GRUB start +#GRUB_INIT_TUNE="480 440 1" + +#GRUB_SAVEDEFAULT="true" diff --git a/modules/grub_install/manifests/init.pp b/modules/grub_install/manifests/init.pp new file mode 100644 index 0000000..172cf4b --- /dev/null +++ b/modules/grub_install/manifests/init.pp @@ -0,0 +1,32 @@ +class grub_install ( + $device = undef +) { + ensure_packages(['grub']) + + # unless empty($device) { + # exec { 'install GRUB': + # command => "/usr/bin/grub-install --target=i386-pc $device", + # subscribe => Package["grub"], + # } + # } + + file_line { "/etc/default/grub#GRUB_CMDLINE_LINUX": + path => "/etc/default/grub", + line => 'GRUB_CMDLINE_LINUX=" console=tty0 console=ttyS0,115200"', + match => '^GRUB_CMDLINE_LINUX=' + } + # file { "/etc/default/grub": + # ensure => "present", + # path => "/etc/default/grub", + # source => 'puppet:///modules/grub_install/config', + # mode => "0644", + # owner => "root", + # group => "root", + # # notify => [Exec["install GRUB"], Exec["update GRUB config"]] + # } + + # exec { 'update GRUB config': + # command => "/usr/bin/grub-mkconfig -o /boot/grub/grub.cfg", + # refreshonly => true + # } +} -- cgit v1.2.3