aboutsummaryrefslogtreecommitdiff
path: root/modules/grub_install
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2017-08-14 19:02:29 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2017-08-24 00:33:58 +0200
commitba2cf1b5d938810077b0fd73844faf432e8e8f9d (patch)
tree40884fcc70af8eb349979b2ff62e3e4435bae5a5 /modules/grub_install
parenteb9fec57fcfcc84f0e310e343167a10fb13ca0c8 (diff)
downloadPuppet-ba2cf1b5d938810077b0fd73844faf432e8e8f9d.tar.gz
Puppet-ba2cf1b5d938810077b0fd73844faf432e8e8f9d.tar.zst
Puppet-ba2cf1b5d938810077b0fd73844faf432e8e8f9d.zip
Install OVH vps from scratch
Diffstat (limited to 'modules/grub_install')
-rw-r--r--modules/grub_install/files/config47
-rw-r--r--modules/grub_install/manifests/init.pp32
2 files changed, 79 insertions, 0 deletions
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 @@
1GRUB_DEFAULT=0
2GRUB_TIMEOUT=5
3GRUB_DISTRIBUTOR="Arch"
4GRUB_CMDLINE_LINUX_DEFAULT="quiet"
5GRUB_CMDLINE_LINUX=" console=tty0 console=ttyS0,115200"
6
7# Preload both GPT and MBR modules so that they are not missed
8GRUB_PRELOAD_MODULES="part_gpt part_msdos"
9
10# Uncomment to enable Hidden Menu, and optionally hide the timeout count
11#GRUB_HIDDEN_TIMEOUT=5
12#GRUB_HIDDEN_TIMEOUT_QUIET=true
13
14# Uncomment to use basic console
15GRUB_TERMINAL_INPUT=console
16
17# Uncomment to disable graphical terminal
18#GRUB_TERMINAL_OUTPUT=console
19
20# The resolution used on graphical terminal
21# note that you can use only modes which your graphic card supports via VBE
22# you can see them in real GRUB with the command `vbeinfo'
23GRUB_GFXMODE=auto
24
25# Uncomment to allow the kernel use the same resolution used by grub
26GRUB_GFXPAYLOAD_LINUX=keep
27
28# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
29# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
30#GRUB_DISABLE_LINUX_UUID=true
31
32# Uncomment to disable generation of recovery mode menu entries
33GRUB_DISABLE_RECOVERY=true
34
35# Uncomment and set to the desired menu colors. Used by normal and wallpaper
36# modes only. Entries specified as foreground/background.
37#GRUB_COLOR_NORMAL="light-blue/black"
38#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
39
40# Uncomment one of them for the gfx desired, a image background or a gfxtheme
41#GRUB_BACKGROUND="/path/to/wallpaper"
42#GRUB_THEME="/path/to/gfxtheme"
43
44# Uncomment to get a beep at GRUB start
45#GRUB_INIT_TUNE="480 440 1"
46
47#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 @@
1class grub_install (
2 $device = undef
3) {
4 ensure_packages(['grub'])
5
6 # unless empty($device) {
7 # exec { 'install GRUB':
8 # command => "/usr/bin/grub-install --target=i386-pc $device",
9 # subscribe => Package["grub"],
10 # }
11 # }
12
13 file_line { "/etc/default/grub#GRUB_CMDLINE_LINUX":
14 path => "/etc/default/grub",
15 line => 'GRUB_CMDLINE_LINUX=" console=tty0 console=ttyS0,115200"',
16 match => '^GRUB_CMDLINE_LINUX='
17 }
18 # file { "/etc/default/grub":
19 # ensure => "present",
20 # path => "/etc/default/grub",
21 # source => 'puppet:///modules/grub_install/config',
22 # mode => "0644",
23 # owner => "root",
24 # group => "root",
25 # # notify => [Exec["install GRUB"], Exec["update GRUB config"]]
26 # }
27
28 # exec { 'update GRUB config':
29 # command => "/usr/bin/grub-mkconfig -o /boot/grub/grub.cfg",
30 # refreshonly => true
31 # }
32}