redhat-nfvpe / base-infra-bootstrap

Generic node bootstrap for virtual KVM or baremetal
Apache License 2.0
3 stars 4 forks source link

The conditional check 'vm_disk_device not in pv_list.stdout' failed #18

Closed dougbtv closed 6 years ago

dougbtv commented 6 years ago

As reported by Frank:

TASK [openshift-ansible-bootstrap : Create physical volume] *******************************************************************************************************************************************************
fatal: [openshift-master]: FAILED! => {"msg": "The conditional check 'vm_disk_device not in pv_list.stdout' failed. The error was: error while evaluating conditional (vm_disk_device not in pv_list.stdout): Unable to look up a name or access an attribute in template string ({% if vm_disk_device not in pv_list.stdout %} True {% else %} False {% endif %}).\nMake sure your variable name does not 
contain invalid characters like '-': coercing to Unicode: need string or buffer, StrictUndefined found\n\nThe error appears to have been in '/home/remote/fzdarsky/repos/github.com_redhat-nfvpe_base-infra-bootstrap/roles/openshift-ansible-bootstrap/tasks/centos.yml': line 49, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n 

Also provided example inventory

Using this command:

ansible-playbook -i ./inventory/vms.local.generated -v bootstrap.yml

I took a further look and was able to replicate -- may be related to the change out from the embedded VM spinup role to the inclusion of the galaxy role.

dougbtv commented 6 years ago

Looks like all said and done, there's a possibility this is just a missing default variable:

vm_disk_device: vdb

Likely to be placed in ./roles/openshift-ansible-bootstrap/defaults/main.yml