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