Files
fedora-infra_ansible/roles/serial-console/tasks/main.yml
Ryan Lerch 3c41882bb0 ansiblelint fixes - fqcn[action-core] - shell to ansible.builtin.shell
Replaces references to shell: with ansible.builtin.shell

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:29:10 +10:00

38 lines
985 B
YAML

#
# This role sets up serial console on ttyS1
#
---
- name: Check for grub serial setup
ansible.builtin.shell: grep options /boot/loader/entries/*
register: serial
check_mode: no
changed_when: '1 != 1'
failed_when: '1 != 1'
tags:
- serial-console
- name: Set grub to use serial console
ansible.builtin.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
when: ansible_architecture == 'x86_64'
tags:
- serial-console
- name: Enable and start getty on both serial ports
systemd:
name: serial-getty@ttyS1
state: started
enabled: true
when: ansible_architecture == 'x86_64'
tags:
- serial-console