I managed to fix this. I tried downgrading shade but that didn't help, anything below 1.12.1 gave: *"msg": "Error in creating instance (Inner Exception: Missing imageRef attribute (HTTP 400) (Request-ID: req-48b19472-b5d4-4772-8f98-47112f176592))"*
In fact, with shade <1.12.1 *none* of the previously fetched facts included the .id value, vars like openstack_image.id were not returned. Using shade 1.11 I tried hardcoding the subnet id & image and that worked in creating an instance. I tried the python example from the shade readme on GitHub (https://github.com/openstack-infra/shade/blob/master/README.rst) and that worked also. Instance got created & booted etc. Hmm I upgraded shade back to 1.12.1 and tried again, lo and behold, it got created! Great! On Monday, November 7, 2016 at 3:15:59 PM UTC+1, Lars Van Casteren wrote: > > Hi, > > I'm trying to create a vm instance via ansible on trystack. Modules such > as os_network, os_subnet and os_image_facts are all working. > When trying to use os_server I get this message: > > fatal: [localhost]: FAILED! => {"changed": false, "extra_data": null, > "failed": true, "msg": "Error in creating instance (Inner Exception: > create() takes at least 4 arguments (9 given))"} > > This is the yaml: > - name: Create a Cirros Server instance > os_server: > state: present > name: server1 > image: openstack_image.id > key_name: Key_1 > timeout: 200 > flavor: 1 > nics: > - net-id: openstack_subnets.id > meta: > hostname: server1 > group: testgroup > > Shade 1.12.1 > Openstack: 3.3.0 > > Where should I start looking? > > Thanks! > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d6f1a3f8-c43a-4b58-bc9b-2c40efdd2572%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
