Start with host-specific install config generation

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2018-08-20 21:01:17 +00:00
parent 72cd3aba20
commit d9264225b5
4 changed files with 45 additions and 0 deletions

View file

@ -45,6 +45,9 @@ custom_rules: []
nat_rules: []
custom6_rules: []
# defaults for hw installs
install_noc: none
# defaults for virt installs
ks_url: http://infrastructure.fedoraproject.org/repo/rhel/ks/kvm-rhel-7
ks_repo: http://infrastructure.fedoraproject.org/repo/rhel/RHEL7-x86_64/

View file

@ -8,3 +8,10 @@ br0_ip: 10.5.128.40
br0_nm: 255.255.255.0
br1_ip: 10.5.127.202
br1_nm: 255.255.255.0
install_noc: noc01.phx2.fedoraproject.org
install_mac: 24-6E-96-B1-C7-F4
# Inside this, expect /vmlinuz and /initrd.img
install_binpath: /uefi/x86_64/el7
install_ks: http://10.5.126.23/repo/rhel/ks/hardware-rhel-7-08disk
install_repo: http://10.5.126.23/http://10.5.126.23/repo/rhel/RHEL7-x86_64/

View file

@ -40,3 +40,10 @@
synchronize: src="{{ bigfiles }}/tftpboot/" dest=/var/lib/tftpboot/
tags:
- tftp_server
- name: generate custom configs
template: src=grubhost.cfg dest="/var/lib/tftpboot/uefi/{{ item.install_mac }}"
with_items: groups['all']
when: "hostvars[item].install_noc == ansible_inventory_hostname"
tags:
- tftp_server

View file

@ -0,0 +1,28 @@
set default="0"
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set timeout=5
menuentry 'Install {{ item }}' --class red --class gnu-linux --class gnu --class os {
linux {{ hostvars[item].install_binpath }}/vmlinuz ip=dhcp biosdevname=0 ksdevice=eth0 net.ifnames=0 ks={{ hostvars[item].install_ks }} inst.repo={{ hostvars[item].install_repo }} nomodeset
initrd {{ hostvars[item].install_binpath }}/initrd.img
}