diff --git a/deploy/templates/openstack_meta_data.json.j2 b/deploy/templates/openstack_meta_data.json.j2 index fbb35df6b..874ef0157 100644 --- a/deploy/templates/openstack_meta_data.json.j2 +++ b/deploy/templates/openstack_meta_data.json.j2 @@ -4,7 +4,7 @@ { "content_path": "/content/0000", "path": "/etc/network/interfaces" - }, + } ], "hostname": "{{item.split(',')[10]}}", "name": "{{item.split(',')[10]}}", diff --git a/setup/create_bootable_image.yaml b/setup/create_bootable_image.yaml index 96592b739..a3054151a 100644 --- a/setup/create_bootable_image.yaml +++ b/setup/create_bootable_image.yaml @@ -23,18 +23,25 @@ file: path=/mnt/bootimg state=directory - name: "Mounting volume on /mnt/bootimg" command: mount "{{stored_value_loopback_beta.stdout}}" /mnt/bootimg -- name: "Place grub device file map" - template: src=templates/device.map.j2 dest=/mnt/bootimg/boot/grub/device.map - name: "Binding /sys into /mnt/bootimg/sys" command: mount -t sysfs sysfs /mnt/bootimg/sys - name: "Binding /proc into /mnt/bootimg/proc" command: mount -t proc proc /mnt/bootimg/proc - name: "Binding /dev into /mnt/bootimg/dev" command: mount --bind /dev /mnt/bootimg/dev -- name: "Make grub configuration" - command: chroot /mnt/bootimg/ grub-mkconfig -o /boot/grub/grub.cfg + # Attempt to identify kernel +#- name: "Identify kernel" +# shell: ls vmlinuz* |cut -f 1 -d ' ' chdir=/mnt/bootimg/boot/ +# register: kernel_filename +#- name: "Identify initrd" +# shell: ls initrd* |cut -f 1 -d ' ' chdir=/mnt/bootimg/boot/ +# register: initrd_filename +- name: "Disable Grub Prober" + shell: echo "GRUB_DISABLE_OS_PROBER=true" >>/etc/default/grub +- name: "Disable Grub Prober" + shell: echo 'GRUB_TERMIAL="serial console"' >>/etc/default/grub - name: "Run the grub-install tool" - command: grub-install --grub-mkdevicemap=/mnt/bootimg/boot/grub/grub.cfg --root-directory=/mnt/bootimg "{{stored_value_loopback_alpha.stdout}}" + command: chroot /mnt/bootimg grub-install --boot-directory=/boot --modules="biosdisk part_msdos" "{{stored_value_loopback_alpha.stdout}}" - name: "Unlink /dev/bootimg/dev" command: umount /mnt/bootimg/dev - name: "Unlink /dev/bootimg/proc" diff --git a/setup/templates/device.map.j2 b/setup/templates/device.map.j2 deleted file mode 100644 index 2d39fd9fd..000000000 --- a/setup/templates/device.map.j2 +++ /dev/null @@ -1,2 +0,0 @@ -(hd0) {{stored_value_loopback_alpha.stdout}} -(hd0,msdos1) {{stored_value_loopback_beta.stdout}} diff --git a/setup/templates/dnsmasq.conf.j2 b/setup/templates/dnsmasq.conf.j2 index be5482518..6281df5bd 100644 --- a/setup/templates/dnsmasq.conf.j2 +++ b/setup/templates/dnsmasq.conf.j2 @@ -423,7 +423,7 @@ dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},12h # load. The dhcp-match sets the gpxe tag for requests from gPXE. dhcp-match=set:ipxe,175 # iPXE sends a 175 option. dhcp-boot=tag:!ipxe,undionly.kpxe -dhcp-boot=http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}/boot.ipxe +dhcp-boot=http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:8080/boot.ipxe # Encapsulated options for Etherboot gPXE. All the options are # encapsulated within option 175