Don't use static ip for install when gateway is not defined
This commit is contained in:
parent
c8387f759a
commit
5bcc6cfde7
2 changed files with 4 additions and 0 deletions
|
@ -10,8 +10,10 @@ ipcmd: >-
|
||||||
{% if network_interfaces[0]['proto'] is defined %}
|
{% if network_interfaces[0]['proto'] is defined %}
|
||||||
{% if network_interfaces[0]['proto'] == 'static' %}
|
{% if network_interfaces[0]['proto'] == 'static' %}
|
||||||
{% set int=network_interfaces[0] %}
|
{% set int=network_interfaces[0] %}
|
||||||
|
{% if int['ipaddr'] is defined and int['gateway'] is defined %}
|
||||||
nameserver=8.8.8.8
|
nameserver=8.8.8.8
|
||||||
ip={{ int['ipaddr'] }}::{{ int['gateway'] }}:{{ int['netmask'] }}:::none
|
ip={{ int['ipaddr'] }}::{{ int['gateway'] }}:{{ int['netmask'] }}:::none
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
virt_install_os_args: >
|
virt_install_os_args: >
|
||||||
|
|
|
@ -10,8 +10,10 @@ ipcmd: >-
|
||||||
{% if network_interfaces[0]['proto'] is defined %}
|
{% if network_interfaces[0]['proto'] is defined %}
|
||||||
{% if network_interfaces[0]['proto'] == 'static' %}
|
{% if network_interfaces[0]['proto'] == 'static' %}
|
||||||
{% set int=network_interfaces[0] %}
|
{% set int=network_interfaces[0] %}
|
||||||
|
{% if int['ipaddr'] is defined and int['gateway'] is defined %}
|
||||||
nameserver=8.8.8.8
|
nameserver=8.8.8.8
|
||||||
ip={{ int['ipaddr'] }}::{{ int['gateway'] }}:{{ int['netmask'] }}:::none
|
ip={{ int['ipaddr'] }}::{{ int['gateway'] }}:{{ int['netmask'] }}:::none
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
virt_install_os_args: >
|
virt_install_os_args: >
|
||||||
|
|
Loading…
Add table
Reference in a new issue