summaryrefslogtreecommitdiffstats
path: root/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-post.yml
blob: 55b0e160a8a0a7f2097acfc8b2d67f6537deee72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---

- name: restart neutron-server
  service: name=neutron-server state=restarted enabled=yes
  when: inventory_hostname in groups['neutron_server']

- name: restart neutron-l3-agent server
  service: name=neutron-l3-agent state=restarted
  when:
    - odl_l3_agent == "Disable"
    - inventory_hostname in groups['neutron_openvswitch_agent']
    - inventory_hostname not in groups['nova_compute']

- name: restart neutron-dhcp-agent server
  service: name=neutron-dhcp-agent state=restarted
  when:
    - inventory_hostname in groups['neutron_openvswitch_agent']
    - inventory_hostname not in groups['nova_compute']

- name: restart neutron-metadata-agent server
  service: name=neutron-metadata-agent state=restarted
  when:
    - inventory_hostname in groups['neutron_openvswitch_agent']
    - inventory_hostname not in groups['nova_compute']

- name: remove karaf data directory
  file:
    path: "{{ odl_home }}data"
    state: absent
  when: inventory_hostname in groups['network_hosts']

- name: restart opendaylight
  shell: sleep 60; service opendaylight restart; sleep 60;
  when: inventory_hostname in groups['network_hosts']

- name: creat ml2 directory on ODL hosts
  file:
    path: /etc/neutron/plugins/ml2/
    state: directory
    mode: 0755
  when:
    - inventory_hostname in groups['network_hosts']
    - odl_sfc == "Enable"

- name: copy ml2_conf.ini to ODL hosts
  copy:
    src: /tmp/ml2_conf.ini
    dest: /etc/neutron/plugins/ml2/ml2_conf.ini
    mode: 0755
  when:
    - inventory_hostname in groups['network_hosts']
    - odl_sfc == "Enable"