iad2: Setup serial console for sol in iad2.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
parent
4566958e77
commit
fda9b67243
2 changed files with 7 additions and 6 deletions
|
@ -30,6 +30,7 @@
|
||||||
- { role: openvpn/client, when: vpn|bool }
|
- { role: openvpn/client, when: vpn|bool }
|
||||||
- virthost
|
- virthost
|
||||||
- { role: clevis, when: datacenter == 'iad2'}
|
- { role: clevis, when: datacenter == 'iad2'}
|
||||||
|
- { role: serial-console, when: datacenter == 'iad2'}
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
|
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# This role sets up serial console on ttyS0
|
# This role sets up serial console on ttyS1
|
||||||
#
|
#
|
||||||
- name: check for grub serial setup
|
- name: check for grub serial setup
|
||||||
command: cat /etc/grub2-efi.cfg
|
command: cat /etc/grub2-efi.cfg
|
||||||
|
@ -11,23 +11,23 @@
|
||||||
- serial-console
|
- serial-console
|
||||||
|
|
||||||
- name: set grub to use serial console
|
- name: set grub to use serial console
|
||||||
command: /sbin/grubby --update-kernel=ALL --args="console=tty0 console=ttyS0,115200"
|
command: /sbin/grubby --update-kernel=ALL --args="console=tty0 console=ttyS1,115200"
|
||||||
when: serial is defined and serial.stdout.find("console=tty0 console=ttyS0,115200") == -1
|
when: serial is defined and serial.stdout.find("console=tty0 console=ttyS1,115200") == -1
|
||||||
failed_when: '1 != 1'
|
failed_when: '1 != 1'
|
||||||
tags:
|
tags:
|
||||||
- serial-console
|
- serial-console
|
||||||
|
|
||||||
- name: setup systemd links for getty (S0)
|
- name: setup systemd links for getty (S0)
|
||||||
copy: src=serial-getty@.service dest=/etc/systemd/system/serial-getty@ttyS0.service
|
copy: src=serial-getty@.service dest=/etc/systemd/system/serial-getty@ttyS1.service
|
||||||
tags:
|
tags:
|
||||||
- serial-console
|
- serial-console
|
||||||
|
|
||||||
- name: link template in
|
- name: link template in
|
||||||
file: dest=/etc/systemd/system/getty.target.wants/serial-getty@ttyS0 src=/etc/systemd/system/serial-getty@ttyS0.service state=link
|
file: dest=/etc/systemd/system/getty.target.wants/serial-getty@ttyS1 src=/etc/systemd/system/serial-getty@ttyS1.service state=link
|
||||||
tags:
|
tags:
|
||||||
- serial-console
|
- serial-console
|
||||||
|
|
||||||
- name: start and enable
|
- name: start and enable
|
||||||
service: name=serial-getty@ttyS0 enabled=yes state=started
|
service: name=serial-getty@ttyS1 enabled=yes state=started
|
||||||
tags:
|
tags:
|
||||||
- serial-console
|
- serial-console
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue