1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
{% extends 'base.jinja2' %}
{% set boot_character_delay = 10 %}
{% set base_ip_args = 'ip=:::::eth0:dhcp' %}
{% set console_device = console_device | default('ttyS0') -%}
{% set baud_rate = baud_rate | default(115200) -%}
{# method is 'pxe-grub' or 'grub' currently - see menu uefi-menu block #}
{% set grub_efi_method = grub_efi_method|default('pxe-grub') %}
{% set tftp_mac = tftp_mac | default('00:01:73:69:5A:EF') -%}
{# declare placeholders for use in the UI #}
{% set placeholders = [ 'tftp_mac', 'console_device', 'baud_rate'] -%}
{# allow job context override - use a different variable name, undefined if not in job context #}
{% set base_menu_interrupt_prompt = menu_interrupt_prompt | default(base_menu_interrupt_prompt) -%}
{% set base_menu_interrupt_string = menu_interrupt_string | default(base_menu_interrupt_string) -%}
{% set base_item_markup_list = item_markup | default(base_item_markup_list) -%}
{% set base_item_class = item_class | default(base_item_class) -%}
{% set base_item_separator = item_separator | default(base_item_separator) -%}
{% set base_label_class = label_class | default(base_label_class) -%}
{% set base_menu_bootloader_prompt = bootloader_prompt | default(base_menu_bootloader_prompt) -%}
{% set base_menu_boot_message = boot_message | default(base_menu_boot_message) -%}
{% set base_menu_dictionary = menu_dictionary | default(base_menu_dictionary) -%}
{% set base_early_printk = menu_early_printk | default('earlyprintk=uart8250-32bit,0x1c020000') -%}
{% block body %}
device_type: mustang
actions:
deploy:
methods:
sata:
tftp:
ssh:
options:
{{ ssh_options }}
host: '{{ ssh_host|default('') }}'
user: {{ ssh_user|default('root') }}
port: {{ ssh_port|default(22) }}
identity_file: {{ ssh_identity_file }}
boot:
connections:
serial:
ssh:
methods:
ssh:
grub-efi:
menu_options: {{ grub_efi_method }}
parameters:
bootloader_prompt: {{ grub_efi_bootloader_prompt|default('grub>') }}
ramdisk:
commands:
- insmod gzio
{% if grub_efi_method == 'grub' %}
- insmod efinet
- net_bootp
{% endif %}
- linux (tftp,{SERVER_IP})/{KERNEL} console={{ console_device }},{{ baud_rate }}n8 debug
root=/dev/ram0 rw {{ base_ip_args }} {{ extra_kernel_args }}
- initrd (tftp,{SERVER_IP})/{RAMDISK}
- boot
installed:
commands:
- insmod gzio
{% if grub_efi_method == 'grub' %}
- insmod efinet
- net_bootp
{% endif %}
- linux (tftp,{SERVER_IP})/{KERNEL} console={{ console_device }},{{ baud_rate }}n8 debug
root={{ root_uuid|default('/dev/sda2') }} rw {{ base_ip_args }} {{ extra_kernel_args }}
- initrd (tftp,{SERVER_IP})/{RAMDISK}
- boot
nfs:
commands:
- insmod gzio
{% if grub_efi_method == 'grub' %}
- insmod efinet
- net_bootp
{% endif %}
- 'linux (tftp,{SERVER_IP})/{KERNEL} console={{ console_device }},{{ baud_rate }}n8 debug
root=/dev/nfs rw {{ base_nfsroot_args }} {{ base_ip_args }} {{ extra_kernel_args }}'
- initrd (tftp,{SERVER_IP})/{RAMDISK}
- boot
sata:
commands:
- insmod gzio
- linux ({{ sata_interface|default('hd0') }},{{ boot_part|default('gpt1') }})/{KERNEL}
console={{ console_device }},{{ baud_rate }}n8 debug
root={{ root_uuid|default('/dev/sda2') }} rw {{ base_ip_args }} {{ extra_kernel_args }}
- initrd ({{ sata_interface|default('hd0') }},{{ boot_part|default('gpt1') }}/{RAMDISK}
- boot
uefi-menu:
menu_options: {{ grub_efi_method }}
parameters:
interrupt_prompt: {{ base_menu_interrupt_prompt }}
interrupt_string: '{{ base_menu_interrupt_string }}'
item_markup:
{{ base_item_markup_list }}
item_class: '{{ base_item_class }}'
separator: '{{ base_item_separator }}'
bootloader_prompt: '{{ base_menu_bootloader_prompt }}'
{% if grub_efi_method == 'pxe-grub' %}
pxe-grub:
- select:
items:
- '{{ grub_efi_pxe_menu_item|default('LAVA PXE Grub') }}'
{% elif grub_efi_method == 'grub' %}
grub:
- select:
items:
- '{{ grub_efi_grub_menu_item|default('Local ERP Grub') }}'
{% endif %}
{% endblock body %}
|