Sam Yaple b401a90254 Add linuxbridge as option to ansible
Allows the user to configure neutron_plugin_agent value for Ansible.
Current allowed values are openvswitch and linuxbridge.

Implements: blueprint ansible-neutron-linuxbridge

Change-Id: I0572464a5459d2f9da09b6da22db16e240511f99
2015-08-02 11:48:21 +00:00

85 lines
3.3 KiB
YAML

---
- include: ../../start.yml
vars:
container_environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
container_image: "{{ docker_openvswitch_db_image_full }}"
container_name: "openvswitch_db"
container_volumes:
- "/run:/run"
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
and neutron_plugin_agent == "openvswitch"
- include: ../../start.yml
vars:
container_environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
container_image: "{{ docker_openvswitch_vswitchd_image_full }}"
container_name: "openvswitch_vswitchd"
container_privileged: "True"
container_volumes:
- "/run:/run"
- "/lib/modules:/lib/modules:ro"
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
and neutron_plugin_agent == "openvswitch"
- name: Ensuring OVS bridge is properly setup
command: docker exec openvswitch_vswitchd /opt/kolla/ovs_ensure_configured.sh {{ neutron_bridge_name }} {{ neutron_external_interface }}
register: status
changed_when: status.stdout.find('changed') != -1
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
and neutron_plugin_agent == "openvswitch"
- include: ../../start.yml
vars:
container_environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
container_image: "{{ docker_neutron_server_image_full }}"
container_name: "neutron_server"
container_volumes:
- "{{ node_config_directory }}/neutron-server/:/opt/kolla/neutron-server/:ro"
when: inventory_hostname in groups['neutron-server']
- include: ../../start.yml
vars:
container_environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
container_image: "{{ docker_neutron_openvswitch_agent_image_full }}"
container_name: "neutron_openvswitch_agent"
container_privileged: "True"
container_volumes:
- "/run:/run"
- "/lib/modules:/lib/modules:ro"
- "{{ node_config_directory }}/neutron-openvswitch-agent/:/opt/kolla/neutron-openvswitch-agent/:ro"
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
and neutron_plugin_agent == "openvswitch"
- include: ../../start.yml
vars:
container_environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
NEUTRON_BRIDGE: "br-ex"
NEUTRON_INTERFACE: "{{ neutron_external_interface }}"
container_image: "{{ docker_neutron_linuxbridge_agent_image_full }}"
container_name: "neutron_linuxbridge_agent"
container_privileged: "True"
container_volumes:
- "/run:/run"
- "/lib/modules:/lib/modules:ro"
- "{{ node_config_directory }}/neutron-linuxbridge-agent/:/opt/kolla/neutron-linuxbridge-agent/:ro"
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
and neutron_plugin_agent == "linuxbridge"
- include: ../../start.yml
vars:
container_environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
container_image: "{{ docker_neutron_agents_image_full }}"
container_name: "neutron_agents"
container_privileged: "True"
container_volumes:
- "/run:/run"
- "{{ node_config_directory }}/neutron-agents/:/opt/kolla/neutron-agents/:ro"
when: inventory_hostname in groups['neutron-agents']