mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-05 11:14:04 +08:00
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>
35 lines
852 B
YAML
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
|