Debian Codegraph @

ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/templates/ESXI_8.j2

raw
1 accepteula
2 {% if esxi_keyboard is defined and esxi_keyboard != None %}
3 keyboard "{{ esxi_keyboard }}"
4 {% endif %}
5 {% if esxi_iscrypted is defined and esxi_iscrypted == true %}
6 rootpw {{ esxi_rootpw }} --iscrypted
7 {% else %}
8 rootpw {{ esxi_rootpw }}
9 {% endif %}
10 {{ ([esxi_install_type] + esxi_install_options)|join(' ') }}
11 {% set esxicmds = {'clearpart': esxi_clearpart, 'network': esxi_network, 'partition': esxi_partition} %}
12 {% for key,value in esxicmds.items() %}
13 {% if value is defined and value != false %}
14 {{ ([key] + value)|join(' ') }}
15 {% endif %}
16 {% endfor %}
17 {% if esxi_serial_num is defined and esxi_serial_num != None %}
18 serialnum --esx={{ esxi_serial_num }}
19 {% endif %}
20 {# boolean cmds #}
21 {% set boolcmds = {'reboot': esxi_reboot, 'paranoid': esxi_paranoid, 'dryrun': esxi_dryrun} %}
22 {% for key,value in boolcmds.items() %}
23 {% if value is defined and value == true %}
24 {{ key }}
25 {% endif %}
26 {% endfor %}
27 {# scripts logic #}
28 {% set scripts = {'pre': esxi_prescript, 'post': esxi_postscript, 'firstboot': esxi_firstboot} %}
29 {% for key,value in scripts.items() %}
30 {% if value is defined and value != None %}
31 {% set xkey = value %}
32 {% endif %}
33 {% if xkey is defined and xkey.args != None %}
34 %{{ key }} --interpreter={{ xkey.interpreter | default('busybox') }}
35 {% for cmd in xkey.args %}
36 {{ cmd }}
37 {% endfor %}
38 {% endif %}
39 {% endfor %}