X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=ansible%2Froles%2Fvm%2Fgrub%2Ftasks%2Fmain.yml;h=eb868d38852e595608c31d4a3e9212438d6c04f7;hb=4d4c74d4762d367eaab6a277cb59cc87f7a7b1f5;hp=f751243a295e068c8a973db18f635fea8c1b33d8;hpb=320cd6f207345a4101fe4f353d86d3a66a6eabd3;p=noc.git diff --git a/ansible/roles/vm/grub/tasks/main.yml b/ansible/roles/vm/grub/tasks/main.yml index f751243..eb868d3 100644 --- a/ansible/roles/vm/grub/tasks/main.yml +++ b/ansible/roles/vm/grub/tasks/main.yml @@ -1,16 +1,15 @@ --- - name: enable serial console in grub and for kernel - with_items: - - regexp: '^GRUB_TIMEOUT=' - line: 'GRUB_TIMEOUT=2' - - regexp: '^GRUB_CMDLINE_LINUX=' - line: 'GRUB_CMDLINE_LINUX="console=ttyS0,115200n8"' - - regexp: '^GRUB_TERMINAL=' - line: 'GRUB_TERMINAL=serial' - - regexp: '^GRUB_SERIAL_COMMAND=' - line: 'GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"' + with_dict: + GRUB_TIMEOUT: 2 + GRUB_CMDLINE_LINUX: '"console=ttyS0,115200n8"' + GRUB_TERMINAL: serial + GRUB_SERIAL_COMMAND: >- + "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" lineinfile: dest: /etc/default/grub - regexp: "{{ item.regexp }}" - line: "{{ item.line }}" + regexp: "^{{ item.key }}=" + line: "{{ item.key }}={{ item.value }}" notify: update grub + loop_control: + label: "{{ item.key }}"