ansible/group_vars/centos8.yml
Timo Makinen 80fe81cf83 Give CentOS 8 installer explicit network device
Seems that install works without defining this but after install is
completed all interfaces are converted to DHCP which is default.
2021-02-23 18:01:34 +00:00

21 lines
712 B
YAML

---
# default resources for new vm
dsk_size: 20
mem_size: 2048
num_cpus: 1
# extra args for virt-install
ks_file: "{{ boot_url }}/ks/centos8.ks"
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'] }}::eth0:none
{% endif %}
{% endif %}
{% endif %}
virt_install_os_args: >
--location https://nic.funet.fi/pub/mirrors/centos.org/8/BaseOS/x86_64/os
--extra-args "ks={{ ks_file }} console=ttyS0 net.ifnames=0 bootdev=eth0 {{ ipcmd }}"