diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-09-28 08:54:59 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-09-28 08:54:59 +0000 |
| commit | 1e55ee77ca00a38d0175aaeed36837b37a4e0dd3 (patch) | |
| tree | 4a40579bebeced4fa219e3208f52f9cab8e90560 /ansible | |
| parent | cb752f1e57a509c6cb990c500b9557575073fa5d (diff) | |
| parent | 94ea43fa555fac20c15cdb4f4214af20913b6270 (diff) | |
| download | kolla-1e55ee77ca00a38d0175aaeed36837b37a4e0dd3.tar.gz kolla-1e55ee77ca00a38d0175aaeed36837b37a4e0dd3.zip | |
Merge "Replace config-external - openvswitch"
Diffstat (limited to 'ansible')
4 files changed, 38 insertions, 2 deletions
diff --git a/ansible/roles/neutron/tasks/config.yml b/ansible/roles/neutron/tasks/config.yml index 8d138b11c..f7b5df470 100644 --- a/ansible/roles/neutron/tasks/config.yml +++ b/ansible/roles/neutron/tasks/config.yml @@ -147,10 +147,36 @@ template: src: "roles/neutron/templates/neutron-openvswitch-agent.json.j2" dest: "{{ node_config_directory }}/neutron-openvswitch-agent/config.json" - when: neutron_plugin_agent == "openvswitch" + when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) + and neutron_plugin_agent == "openvswitch" + +- name: Ensuring config directories exists + file: + path: "{{ node_config_directory }}/{{ item }}" + state: "directory" + with_items: + - "openvswitch-db-server" + - "openvswitch-vswitchd" + when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) + and neutron_plugin_agent == "openvswitch" + +- name: Copying openvswitch-db-server JSON configuration file + template: + src: "openvswitch-db-server.json.j2" + dest: "{{ node_config_directory }}/openvswitch-db-server/config.json" + when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) + and neutron_plugin_agent == "openvswitch" + +- name: Copying openvswitch-vswitchd JSON configuration file + template: + src: "openvswitch-vswitchd.json.j2" + dest: "{{ node_config_directory }}/openvswitch-vswitchd/config.json" + when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) + and neutron_plugin_agent == "openvswitch" - name: Copying Neutron Linuxbridge JSON configuration file template: src: "roles/neutron/templates/neutron-server.json.j2" dest: "{{ node_config_directory }}/neutron-linuxbridge-agent/config.json" - when: neutron_plugin_agent == "linuxbridge" + when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) + and neutron_plugin_agent == "linuxbridge" diff --git a/ansible/roles/neutron/tasks/start.yml b/ansible/roles/neutron/tasks/start.yml index d028fd2c0..7922aee05 100644 --- a/ansible/roles/neutron/tasks/start.yml +++ b/ansible/roles/neutron/tasks/start.yml @@ -15,6 +15,7 @@ image: "{{ openvswitch_db_image_full }}" volumes: - "/run:/run" + - "{{ node_config_directory }}/openvswitch-db-server/:/opt/kolla/config_files/:ro" env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) @@ -38,6 +39,7 @@ volumes: - "/run:/run" - "/lib/modules:/lib/modules:ro" + - "{{ node_config_directory }}/openvswitch-vswitchd/:/opt/kolla/config_files/:ro" env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) diff --git a/ansible/roles/neutron/templates/openvswitch-db-server.json.j2 b/ansible/roles/neutron/templates/openvswitch-db-server.json.j2 new file mode 100644 index 000000000..ed1773ea2 --- /dev/null +++ b/ansible/roles/neutron/templates/openvswitch-db-server.json.j2 @@ -0,0 +1,4 @@ +{ + "command": "/usr/sbin/ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/run/openvswitch/db.sock --log-file=/var/log/openvswitch/ovsdb-server.log", + "config_files": [] +} diff --git a/ansible/roles/neutron/templates/openvswitch-vswitchd.json.j2 b/ansible/roles/neutron/templates/openvswitch-vswitchd.json.j2 new file mode 100644 index 000000000..b0d8d0712 --- /dev/null +++ b/ansible/roles/neutron/templates/openvswitch-vswitchd.json.j2 @@ -0,0 +1,4 @@ +{ + "command": "/usr/sbin/ovs-vswitchd unix:/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file=/var/log/openvswitch/ovs-vswitchd.log", + "config_files": [] +} |
