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,10 +10,12 @@ 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: >
|
||||||
--extra-args "ks={{ ks_file }} console=ttyS0 net.ifnames=0 ksdevice=eth0 {{ ipcmd }}"
|
--extra-args "ks={{ ks_file }} console=ttyS0 net.ifnames=0 ksdevice=eth0 {{ ipcmd }}"
|
||||||
--location https://nic.funet.fi/pub/mirrors/centos.org/7/os/x86_64
|
--location https://nic.funet.fi/pub/mirrors/centos.org/7/os/x86_64
|
||||||
|
|
|
@ -10,10 +10,12 @@ 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: >
|
||||||
--location https://nic.funet.fi/pub/mirrors/centos.org/8/BaseOS/x86_64/os
|
--location https://nic.funet.fi/pub/mirrors/centos.org/8/BaseOS/x86_64/os
|
||||||
--extra-args "ks={{ ks_file }} console=ttyS0 net.ifnames=0 ksdevice=eth0 {{ ipcmd }}"
|
--extra-args "ks={{ ks_file }} console=ttyS0 net.ifnames=0 ksdevice=eth0 {{ ipcmd }}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue