############################################################################## # Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## --- - name: restart neutron-server service: name=neutron-server state=restarted enabled=yes when: inventory_hostname in groups['odl'] - name: add service daemon shell: > echo keepalived >> /opt/service ; echo neutron-server >> /opt/service ; when: inventory_hostname in groups['odl'] - name: restart neutron-l3-agent server service: name=neutron-l3-agent state=restarted when: inventory_hostname in groups['odl'] and odl_l3_agent == "Disable" - name: restart neutron-dhcp-agent server service: name=neutron-dhcp-agent state=restarted when: inventory_hostname in groups['odl'] - name: restart neutron-metadata-agent server service: name=neutron-metadata-agent state=restarted when: inventory_hostname in groups['odl']