Files
fedora-infra_ansible/roles/serial-console/tasks/main.yml
Kevin Fenzi 9fddbf3f3a serial-console: rework and enable on buildhw-x86
The buildhw-x86 blades also can enable serial console for ipmi/sol.
Rework this to handle the fedora case of options not being in
/etc/grub2-efi.cfg anymore.
Also set both serial S0 and S1 enabled, since some hardware seems to use
one and some uses the other.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-12-08 12:48:21 -08:00

35 lines
852 B
YAML

#
# This role sets up serial console on ttyS1
#
- name: check for grub serial setup
command: grub2-editenv list
register: serial
check_mode: no
changed_when: '1 != 1'
failed_when: '1 != 1'
tags:
- serial-console
- name: set grub to use serial console
command: /sbin/grubby --update-kernel=ALL --args="console=tty0 console=ttyS0,115200 console=ttyS1,115200"
when: serial is defined and serial.stdout.find("console=tty0 console=ttyS0,115200 console=ttyS1,115200") == -1
failed_when: '1 != 1'
tags:
- serial-console
- name: enable and start getty on both serial ports
systemd:
name: serial-getty@ttyS0
state: started
enabled: true
tags:
- serial-console
- name: enable and start getty on both serial ports
systemd:
name: serial-getty@ttyS1
state: started
enabled: true
tags:
- serial-console