[ansible] Fix grub install for Ansible 2.4

this is a followup to Id2bfd1ed552ed566b14f6ac5b222c011ff918bee

while adapting playbooks for Ansible 2.4 compatibility,
this place was missed, and playbooks tried to install grub
to a wrong device.

This patch re-uses the "ironic_root_device" fact set during discovery
as grub install target.

Change-Id: Ibfd885b4702ff86c802a8d184ebb406aae9262b5
This commit is contained in:
Pavlo Shchelokovskyy 2017-10-18 06:15:14 +00:00
parent c1f3560a38
commit 25ad8e6926
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@
register: grub_version_string
- name: install grub to disk
become: yes
command: chroot {{ tmp_rootfs_mount }} /bin/sh -c '{{ grub_install_cmd }} /dev/{{ ansible_devices | first }}'
command: chroot {{ tmp_rootfs_mount }} /bin/sh -c '{{ grub_install_cmd }} {{ ironic_root_device }}'
- name: preload lvm modules for grub2
become: yes
lineinfile: