f751243a295e068c8a973db18f635fea8c1b33d8
[noc.git] / ansible / roles / vm-grub / tasks / main.yml
1 ---
2 - name: enable serial console in grub and for kernel
3   with_items:
4     - regexp: '^GRUB_TIMEOUT='
5       line: 'GRUB_TIMEOUT=2'
6     - regexp: '^GRUB_CMDLINE_LINUX='
7       line: 'GRUB_CMDLINE_LINUX="console=ttyS0,115200n8"'
8     - regexp: '^GRUB_TERMINAL='
9       line: 'GRUB_TERMINAL=serial'
10     - regexp: '^GRUB_SERIAL_COMMAND='
11       line: 'GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"'
12   lineinfile:
13     dest: /etc/default/grub
14     regexp: "{{ item.regexp }}"
15     line: "{{ item.line }}"
16   notify: update grub