diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-06-01 17:52:28 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-06-01 17:52:28 +0200 |
commit | 22d4ec550391e5e013e46347a908179b0c769ff3 (patch) | |
tree | fdb33ea899b753295e29f433d35cf77f8eee6464 /roles/vm/grub/tasks/main.yml | |
parent | fix cloud-install role (diff) | |
parent | with_dict -> loop (diff) |
Merge branch 'no-more-with'
Diffstat (limited to 'roles/vm/grub/tasks/main.yml')
-rw-r--r-- | roles/vm/grub/tasks/main.yml | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/roles/vm/grub/tasks/main.yml b/roles/vm/grub/tasks/main.yml index eb868d38..e663e808 100644 --- a/roles/vm/grub/tasks/main.yml +++ b/roles/vm/grub/tasks/main.yml @@ -1,15 +1,17 @@ --- - name: enable serial console in grub and for kernel - 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" + vars: + grub_options: + 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" + loop: "{{ grub_options | dict2items }}" + loop_control: + label: "{{ item.key }}" lineinfile: dest: /etc/default/grub regexp: "^{{ item.key }}=" line: "{{ item.key }}={{ item.value }}" notify: update grub - loop_control: - label: "{{ item.key }}" |