Skip to content

Commit

Permalink
Add conditional for overlay network settings
Browse files Browse the repository at this point in the history
A conditional has been added to the ``_local_ip`` settings used in
the ``neutron_local_ip`` which removes the hard requirement for an
overlay network to be set within a deployment. If no overlay network
is set within the deployment the ``local_ip`` will be set to the
value of ``ansible_ssh_host``.

Change-Id: I954a46443b5434b589226c4999e71bd6ba6a5c0b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
  • Loading branch information
cloudnull authored and jimmymccrory committed Jun 18, 2016
1 parent 8ef3b5d commit b8802f5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 6 additions & 4 deletions playbooks/os-neutron-install.yml
Expand Up @@ -170,22 +170,23 @@

- name: set local_ip fact (is_metal)
set_fact:
_local_ip: "{{ hostvars[inventory_hostname]['ansible_' + _overlay_network.bridge|replace('-', '_')]['ipv4']['address'] }}"
when: is_metal | bool
_local_ip: "{{ hostvars[inventory_hostname]['ansible_' + _overlay_network.bridge|default('br-mgmt')|replace('-', '_')]['ipv4']['address']|default(ansible_ssh_host) }}"
when:
- is_metal | bool
tags:
- neutron-config

- name: set local_ip fact (container)
set_fact:
_local_ip: "{{ _overlay_network.address|default(ansible_ssh_host) }}"
when: not is_metal | bool
when:
- not is_metal | bool
tags:
- neutron-config
roles:
- role: "os_neutron"
neutron_venv_tag: "{{ openstack_release }}"
neutron_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/neutron-{{ openstack_release }}.tgz"
neutron_local_ip: "{{ _local_ip }}"
neutron_overlay_network: "{{ _overlay_network }}"
neutron_provider_networks: "{{ _provider_networks }}"
pip_lock_to_internal_repo: "{{ (pip_links | length) >= 1 }}"
Expand All @@ -211,6 +212,7 @@
neutron_galera_user: neutron
neutron_galera_database: neutron
neutron_galera_address: "{{ galera_address }}"
neutron_local_ip: "{{ _local_ip|default('127.0.0.1') }}"
bind_prefix: "{{ provider_network_bind_prefix|default('') }}"
neutron_rabbitmq_userid: neutron
neutron_rabbitmq_vhost: /neutron
Expand Down
@@ -0,0 +1,7 @@
---
features:
- A conditional has been added to the ``_local_ip`` settings used in
the ``neutron_local_ip`` which removes the hard requirement for an
overlay network to be set within a deployment. If no overlay network
is set within the deployment the ``local_ip`` will be set to the value
of "ansible_ssh_host".

0 comments on commit b8802f5

Please sign in to comment.