summaryrefslogtreecommitdiffstats
path: root/lib/ansible/playbooks/post_deploy_overcloud.yml
blob: f3dbfbd26cba3440be5e4d116d5a342e1dcdca6a (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
- hosts: all
  tasks:
    - name: Bring up br-phy for OVS DPDK
      shell: ifup br-phy
      when:
        - dataplane == 'ovs_dpdk'
        - "'compute' in ansible_hostname"
      become: yes
    - name: Restart OVS Agent for DPDK
      shell: systemctl restart neutron-openvswitch-agent
      when:
        - dataplane == 'ovs_dpdk'
        - "'compute' in ansible_hostname"
        - sdn == false
    - name: Ensure ZRPCD is running
      shell: ps aux | grep zrpcd | grep -v grep
      ignore_errors: yes
      changed_when: false
      register: zrpcd_status
      failed_when: zrpcd_status.rc == 0
      when:
        - vpn
        - "'controller-0' in ansible_hostname"
    - name: VSPERF build base machine
      shell: /build_base_machine.sh
      args:
        chdir: /var/opt/vsperf/systems/
      become: yes
      when:
        - vsperf
        - "'compute-0' in ansible_hostname"
    - name: Fetch logs from node
      fetch:
        src: /var/log/messages
        dest: "{{ apex_temp_dir }}"
    - name: Tacker Fernet Keys Directory
      file:
        path: /etc/tacker/vim/fernet_keys
        state: directory
        mode: 0775
        owner: root
        group: tacker
      become: yes
      when: tacker
    - name: Restart Controller Neutron/Nova Services (Pike Workaround)
      shell: "systemctl restart {{ item }}"
      become: yes
      when:
        - "'controller' in ansible_hostname"
        - os_version == 'pike'
      with_items:
        - neutron-server
        - openstack-nova-api
        - openstack-nova-scheduler
        - openstack-nova-conductor
    - name: Restart Compute Nova Compute (workaround for NFS)
      shell: "docker restart nova_compute"
      become: yes
      when: "'compute' in ansible_hostname or all_in_one"
    - name: Update ODL container restart policy to always
      shell: "docker update --restart=always opendaylight_api"
      become: yes
      when:
        - sdn == 'opendaylight'
        - "'controller' in ansible_hostname"
    - name: Open port 8101 (karaf shell) for ODL
      iptables:
        chain: INPUT
        action: insert
        protocol: tcp
        destination_port: 8101
        jump: ACCEPT
        rule_num: 1
      become: yes
      when:
        - sdn == 'opendaylight'
        - "'controller' in ansible_hostname"
    - name: save iptables
      command: service iptables save
      become: yes
    - name: Modify nova metadata host to be IP
      shell: >
        crudini --set /var/lib/config-data/puppet-generated/neutron/etc/neutron/metadata_agent.ini
        DEFAULT nova_metadata_host $(hiera -c /etc/puppet/hiera.yaml nova_metadata_vip)
      become: yes
      when:
        - "'controller' in ansible_hostname"
        - sdn != 'ovn'
    - name: Restart metadata service
      shell: "docker restart neutron_metadata_agent"
      become: yes
      when:
        - "'controller' in ansible_hostname"
        - sdn != 'ovn'