diff options
Diffstat (limited to 'modules/grub_install/manifests/init.pp')
-rw-r--r-- | modules/grub_install/manifests/init.pp | 32 |
1 files changed, 32 insertions, 0 deletions
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 @@ | |||
1 | class 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 | } | ||