From 34e9567788c82dbbc4c4a2b7e0eae227792ffe7b Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 29 Feb 2016 00:30:42 +0100 Subject: nable serial console on ttyS0 for all Scaleway nodes Add a serial_console puppet module for this. This ensures that a serial getty is started for ttyS0 even if there is no console=ttyS0 argument on kernel command line. Also see http://0pointer.de/blog/projects/serial-console.html --- manifests/nodes/armada.pp | 1 + manifests/nodes/armagnac.pp | 1 + manifests/nodes/armorique.pp | 1 + modules/serial_console/manifests/init.pp | 1 + modules/serial_console/manifests/serial_console.pp | 8 ++++++++ 5 files changed, 12 insertions(+) create mode 100644 modules/serial_console/manifests/init.pp create mode 100644 modules/serial_console/manifests/serial_console.pp diff --git a/manifests/nodes/armada.pp b/manifests/nodes/armada.pp index d4f7bd8a..2b85e28a 100644 --- a/manifests/nodes/armada.pp +++ b/manifests/nodes/armada.pp @@ -2,6 +2,7 @@ node armada { # Location: Scaleway (Iliad/Online datacenter) include common::default_mageia_server timezone::timezone { 'Europe/Paris': } + serial_console::serial_console { 'ttyS0': } include mga_buildsystem::buildnode } diff --git a/manifests/nodes/armagnac.pp b/manifests/nodes/armagnac.pp index 2dc82f0d..27fa26fc 100644 --- a/manifests/nodes/armagnac.pp +++ b/manifests/nodes/armagnac.pp @@ -2,6 +2,7 @@ node armagnac { # Location: Scaleway (Iliad/Online datacenter) include common::default_mageia_server timezone::timezone { 'Europe/Paris': } + serial_console::serial_console { 'ttyS0': } include mga_buildsystem::buildnode } diff --git a/manifests/nodes/armorique.pp b/manifests/nodes/armorique.pp index 0272cd61..0a50f9b6 100644 --- a/manifests/nodes/armorique.pp +++ b/manifests/nodes/armorique.pp @@ -2,6 +2,7 @@ node armorique { # Location: Scaleway (Iliad/Online datacenter) include common::default_mageia_server timezone::timezone { 'Europe/Paris': } + serial_console::serial_console { 'ttyS0': } include mga_buildsystem::buildnode } diff --git a/modules/serial_console/manifests/init.pp b/modules/serial_console/manifests/init.pp new file mode 100644 index 00000000..b6716954 --- /dev/null +++ b/modules/serial_console/manifests/init.pp @@ -0,0 +1 @@ +class serial_console {} diff --git a/modules/serial_console/manifests/serial_console.pp b/modules/serial_console/manifests/serial_console.pp new file mode 100644 index 00000000..dd68c84c --- /dev/null +++ b/modules/serial_console/manifests/serial_console.pp @@ -0,0 +1,8 @@ +# name: ttyS0 +define serial_console::serial_console() { + service { "serial-getty@${name}": + provider => systemd, + ensure => running, + enable => true, + } +} -- cgit v1.2.1