Don't use static ip for install when gateway is not defined

This commit is contained in:
Timo Makinen 2020-09-24 15:44:00 +00:00
parent c8387f759a
commit 5bcc6cfde7
2 changed files with 4 additions and 0 deletions

View file

@ -10,8 +10,10 @@ ipcmd: >-
{% if network_interfaces[0]['proto'] is defined %}
{% if network_interfaces[0]['proto'] == 'static' %}
{% set int=network_interfaces[0] %}
{% if int['ipaddr'] is defined and int['gateway'] is defined %}
nameserver=8.8.8.8
ip={{ int['ipaddr'] }}::{{ int['gateway'] }}:{{ int['netmask'] }}:::none
{% endif %}
{% endif %}
{% endif %}
virt_install_os_args: >

View file

@ -10,8 +10,10 @@ ipcmd: >-
{% if network_interfaces[0]['proto'] is defined %}
{% if network_interfaces[0]['proto'] == 'static' %}
{% set int=network_interfaces[0] %}
{% if int['ipaddr'] is defined and int['gateway'] is defined %}
nameserver=8.8.8.8
ip={{ int['ipaddr'] }}::{{ int['gateway'] }}:{{ int['netmask'] }}:::none
{% endif %}
{% endif %}
{% endif %}
virt_install_os_args: >