diff --git a/handlers/main.yml b/handlers/main.yml index 11c8d960..23108d85 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -70,6 +70,14 @@ - "Restart neutron services" - "venv changed" +- name: Restart openvswitch + service: + name: "{{ neutron_ovs_service_name }}" + state: restarted + listen: + - "Restart provider services" + when: neutron_needs_openvswitch | bool + - name: Symlink neutron config directory file: # NOTE(cloudnull): The "src" path is relative. This ensures all files remain diff --git a/tasks/neutron_install.yml b/tasks/neutron_install.yml index 19a697fb..b1f56ed7 100644 --- a/tasks/neutron_install.yml +++ b/tasks/neutron_install.yml @@ -29,12 +29,16 @@ package: name: "{{ neutron_package_list }}" state: "{{ neutron_package_state }}" + policy_rc_d: "{{ (neutron_needs_openvswitch | bool and ansible_facts['pkg_mgr'] == 'apt') | ternary(101, omit) }}" update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}" cache_valid_time: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary(cache_timeout, omit) }}" register: install_packages until: install_packages is success retries: 5 delay: 2 + notify: + - "Restart neutron services" + - "Restart provider services" - name: Remove known problem packages package: @@ -70,7 +74,6 @@ venv_build_constraints: "{{ _u_c_contents.content.split('\n') | reject('match', '^(ceilometer|neutron)=') | list }}" venv_build_distro_package_list: "{{ neutron_devel_distro_packages }}" venv_install_destination_path: "{{ neutron_bin | dirname }}" - venv_install_distro_package_list: "{{ neutron_package_list }}" venv_pip_install_args: "{{ neutron_pip_install_args }}" venv_pip_packages: "{{ neutron_venv_packages }}" venv_facts_when_changed: