0

When using vca_vapp in Ansible against VCloud, I get the error "AttributeError: 'NoneType' object has no attribute 'startswith'" when using the example.

TASK [vca_vapp vm_name=myvm3 username={{ username }}
template_name=Ubuntu Server 12.04 LTS (amd6420150127) 
vapp_name=myapp instance_id={{ instanceid }} state=present
operation=poweron password={{ admin_pass }} vdc_name=VDC2] ***
An exception occurred during task execution. To see the full
traceback, use -vvv. The error was: AttributeError: 'NoneType'
object has no attribute 'startswith' fatal: [localhost]: FAILED!
=> {"changed": false, "failed": true, "parsed": false}
Sonia Hamilton
  • 341
  • 1
  • 4
  • 11

1 Answers1

0

Solution: you need to set the (undocumented) 'host' variable. For example:

   - vca_vapp:                                                                      
       host: 'https://vca.vmware.com'                                               
       vapp_name: myapp                                                             
       vm_name: myvm                                                                
       state: present                                                               
       operation: poweron                                                           
       instance_id: "{{ instanceid }}" 

See this pull request: https://github.com/ansible/ansible-modules-extras/pull/1355

Sonia Hamilton
  • 341
  • 1
  • 4
  • 11