forked from infra/ansible
common: enable serial console on KVM VMs
This commit is contained in:
parent
36b75e1c6a
commit
1b0db12005
@ -3,5 +3,8 @@
|
||||
- name: Restart journald
|
||||
service: name=systemd-journald state=restarted
|
||||
|
||||
- name: update-grub
|
||||
command: update-grub
|
||||
|
||||
- name: update-initramfs
|
||||
command: update-initramfs -u -k all
|
||||
|
@ -38,6 +38,15 @@
|
||||
copy: src=resume dest=/etc/initramfs-tools/conf.d/resume
|
||||
notify: update-initramfs
|
||||
|
||||
- name: Enable serial console on KVM VMs
|
||||
lineinfile:
|
||||
path: "/etc/default/grub"
|
||||
state: "present"
|
||||
regexp: "^#?GRUB_CMDLINE_LINUX=.*"
|
||||
line: "GRUB_CMDLINE_LINUX=\"console=ttyS0,115200 console=tty0\""
|
||||
notify: update-grub
|
||||
when: ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm"
|
||||
|
||||
- name: Prevent normal users from running su
|
||||
lineinfile:
|
||||
path: /etc/pam.d/su
|
||||
|
Loading…
Reference in New Issue
Block a user