Skip to content

Unable to associate public IP with loadbalancer #58

@heytrav

Description

@heytrav

Description

I am unable to associate a public IP address with a loadbalancer using the Ansible os_loadbalancer module. I'm following the example code using the auto_public_ip option to try to tell Ansible to create the loadbalancer with a public IP.

     - name: Create loadbalancer                                                                                                                        
       register: loadbalancer_result                                                                                                                    
       os_loadbalancer:                                                                                                                                 
         cloud: "ansible-training"                                                                                                                      
         name: "my-lb"                                                                                                                
         interface: public                                                                                                                              
         auto_public_ip: true                                                                                                                           
         state: present                                                                                                                                 
         vip_network: "training-public"                                                                                                              
         wait: yes                                                                                                                                      
         timeout: 300                                                                                                                                   
                         

It also does not seem to be possible to associate a floating IP with a loadbalancer using os_floating_ip and assigning it to the loadbalancer.

Expected Result:

Loadbalancer is created with a floating IP

Actual Result:

TASK [Create loadbalancer] ******************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (os_loadbalancer) module: auto_public_ip Supported parameters include: api_timeout, auth, auth_type, availability_zone, cacert, cert, cloud, interface, key, name, region_name, state, timeout, verify, vip_address, vip_network, vip_port, vip_subnet, wait"}

I'm currently using Ansible 2.7.6:

ansible --version                               2 ↵
ansible 2.7.6
  config file = /home/travis/workspace/intermediate-ansible/sample-code/deploying-code/ansible.cfg
  configured module search path = ['/home/travis/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/travis/workspace/intermediate-ansible/venv/lib/python3.5/site-packages/ansible
  executable location = /home/travis/workspace/intermediate-ansible/venv/bin/ansible
  python version = 3.5.2 (default, Nov 12 2018, 13:43:14) [GCC 5.4.0 20160609]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions