0

I'm trying to configure Ansible 1.9 to launch some OpenStack Nova instances. For each instance, I'm attempting to auto-assign a floating IP, connecting it to a public segment. When I try this:

- name: launch  Web01  instance
  hosts: csc
  tasks:
   - nova_compute:
      state: present
      login_username: tenant_2_user
      login_password: hello
      login_tenant_name: tenant_2
      name: Web01
      auth_url: http://mylocalhost:5000/v2.0/
      region_name: RegionOne
      image_id: 95c5f4f2-84f2-47fb-a466-3c786677d21c
      wait_for: 200
      flavor_id: b772be9a-98cd-446f-879e-89baef600ff0
      security_groups: default
   - neutron_floating_ip:
      state=present
      login_username=tenant_2_user
      login_password=hello
      login_tenant_name=tenant_2
      network_name=ext-net
      instance_name=Web01

I get : ERROR: neutron_floating_ip is not a legal parameter in an Ansible task or handler

And when I try this:

- name: launch  Web01  instance
  hosts: csc
  tasks:
   - nova_compute:
      state: present
      login_username: tenant_2_user
      login_password: hello
      login_tenant_name: tenant_2
      name: Web01
      auth_url: http://mylocalhost:5000/v2.0/
      region_name: RegionOne
      image_id: 95c5f4f2-84f2-47fb-a466-3c786677d21c
      wait_for: 200
      flavor_id: b772be9a-98cd-446f-879e-89baef600ff0
      security_groups: default
      auto_floating_ip: yes

msg: unsupported parameter for module: auto_floating_ip

Here is my Ansible version: ansible --version ansible 1.9 configured module search path = /usr/share/ansible

What can I do to have Ansible assign these floating IPs?

-Eugene

Eugene Goldberg
  • 14,286
  • 20
  • 94
  • 167

1 Answers1

2

I got it working. You dont need to use

auto_floating_ip: yes

just use

  floating_ip_pools:
     - Your-external/public-network-id

Hope this helps.