Revision history [back]

click to hide/show revision 1
initial version

Openstack unable to assign ip to Instance

I am using os_server anisble module to spinup an instance. I am able to spinup instance and attach ip to it but after creating the instance I have to manually configure the ip. How can I make it assign the Ip automatically to instance while creating. Here is my module

      - name: Deploy on OpenStack
        hosts: localhost
        gather_facts: false
        - name : Create a new instance
                state: present
                username: automation
                password: automation
                project_name: Automation
         name: test
         image: rhel-guest-image-7.2
         key_name: ansible 
         timeout: 200
         auto_floating_ip: yes
            - net-name: corenet
            - net-name: nmnet
            - net-name: public
           hostname: test1

On the openstack dashboard I can see the ip assigned to the instance but when I open the console on login the instance ip are not present. I have to manually configure it.