Puppet Class: console::systemd
- Defined in:
- manifests/systemd.pp
Overview
Definitions for systemd
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'manifests/systemd.pp', line 3
class console::systemd () {
if $facts['virtual'] == 'kvm' {
service { 'getty@tty1.service':
ensure => running,
enable => true,
}
service { 'serial-getty@ttyS0.service':
ensure => running,
enable => true,
}
file_line { 'grub_input':
ensure => present,
path => '/etc/default/grub',
line => 'GRUB_TERMINAL_INPUT="console serial"',
match => '^GRUB_TERMINAL_INPUT=',
notify => Exec['update grub'],
}
file_line { 'grub_output':
ensure => present,
path => '/etc/default/grub',
line => 'GRUB_TERMINAL_OUTPUT="console serial"',
match => '^GRUB_TERMINAL_OUTPUT=',
notify => Exec['update grub'],
}
file_line { 'grub_serial':
ensure => present,
path => '/etc/default/grub',
line => 'GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"',
match => '^GRUB_SERIAL_COMMAND=',
notify => Exec['update grub'],
}
exec { 'update grub':
command => 'grub-mkconfig -o /boot/grub/grub.cfg',
path => '/usr/sbin:/usr/bin:/sbin:/bin',
refreshonly => true,
}
}
}
|