This commit is contained in:
Julia Kreger 2015-03-09 13:41:24 -04:00
commit 1cb283fce8
4 changed files with 14 additions and 9 deletions

View File

@ -4,7 +4,7 @@
{
"content_path": "/content/0000",
"path": "/etc/network/interfaces"
},
}
],
"hostname": "{{item.split(',')[10]}}",
"name": "{{item.split(',')[10]}}",

View File

@ -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"

View File

@ -1,2 +0,0 @@
(hd0) {{stored_value_loopback_alpha.stdout}}
(hd0,msdos1) {{stored_value_loopback_beta.stdout}}

View File

@ -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