# Copyright (c) 2018 Intel Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. --- - name: Download kolla and kolla-ansible from git repos git: repo: "{{ item.repo }}" dest: "{{ git_repos_path + item.dir }}" version: stable/pike with_items: - { dir: "{{ kolla_path }}", repo: 'https://git.openstack.org/openstack/kolla'} - { dir: "{{ kolla_ans_path }}", repo: 'https://git.openstack.org/openstack/kolla-ansible' } - name: Copy kolla-ansible password.yml and globals.yml shell: cp -r "{{ git_repos_path + kolla_ans_path + '/etc/kolla/' }}" /etc/ - name: Copy kolla-ansible all-in-one, multinode shell: cp * "{{ git_repos_path }}" args: chdir: "{{ git_repos_path + kolla_ans_path + '/ansible/inventory/' }}" - name: Install requirements pip: chdir: "{{ item[0] }}" requirements: "{{ item[1] }}" with_nested: - [ "{{ git_repos_path + kolla_path }}", "{{ git_repos_path + kolla_ans_path }}" ] - [ 'requirements.txt', 'test-requirements.txt' ] - name: pip install . pip: chdir: "{{ item }}" name: '.' with_items: - "{{ git_repos_path + kolla_path }}" - "{{ git_repos_path + kolla_ans_path }}" - name: Run setup.py shell: "python setup.py install" args: chdir: "{{ item }}" with_items: - "{{ git_repos_path + kolla_path }}" - "{{ git_repos_path + kolla_ans_path }}"