1 # Copyright (c) 2018 Intel Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 - name: Modify globals.yml
17 path: /etc/kolla/globals.yml
18 regexp: "{{ item.find }}"
19 replace: "{{ item.insert_after }}"
21 - { find: '^#kolla_base_distro:.*', insert_after: 'kolla_base_distro: "ubuntu"' }
22 - { find: '^#kolla_install_type:.*', insert_after: 'kolla_install_type: "source"' }
23 - { find: '^#openstack_release:.*', insert_after: 'openstack_release: "pike"' }
24 - { find: 'kolla_internal_vip_address:.*', insert_after: 'kolla_internal_vip_address: "{{ deployvm_ip }}"' }
25 - { find: '^#network_interface:.*', insert_after: 'network_interface: "{{ hostvars[ansible_host].ansible_default_ipv4.interface }}"' }
26 - { find: '^#neutron_external_interface:.*', insert_after: 'neutron_external_interface: "{{ neutron_iface }}"' }
27 - { find: '^#enable_haproxy:.*', insert_after: 'enable_haproxy: "no"'}
28 - { find: '^#enable_heat:.*' , insert_after: 'enable_heat: "yes"'}
29 - { find: '^#docker_registry:.*', insert_after: 'docker_registry: "{{ ansible_host }}:4000"' }
31 - name: Generate multinode from inventory
33 src: templates/multinode.j2
34 dest: "{{ git_repos_path + 'multinode' }}"
37 path2multinode: "{{ git_repos_path + kolla_ans_path + '/ansible/inventory/multinode' }}"
39 - name: Append rest groups to multinode file
40 shell: line=`grep -n '\[deployment\]' {{ path2multinode }} | cut -d ':' -f1` && tail -n +$line {{ path2multinode }} >> "{{ git_repos_path + 'multinode' }}"