redhat-nfvpe / ansible-role-vm-spinup

Sets up a virtualization host and spins up libvirt VMs for labs
Apache License 2.0
3 stars 7 forks source link

Need to define static ip related variable for non-static-ip case #20

Closed s1061123 closed 6 years ago

s1061123 commented 6 years ago

Running kube-ansible with latest ansible-role-vm-spinup, it failed with following messages:

TASK [redhat-nfvpe.vm-spinup : Template the SSH spinup script] *****************************************************************************************************************************************************************************************************************
fatal: [vmhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'system_network' is undefined"}

The variable "system_network" seems to be used only for static ip assign case, however, ansible is trying to filling these variables into spinup.sh for all case hence "AnsibleUndefinedVariable" is occured.

leifmadsen commented 6 years ago

@s1061123 can you try out my PR and see if that resolves this problem? If so, please merge it down!