aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/infra_deploy_openstack/tasks/install_kolla.yml
blob: 38c163c6c12c23ee6e704d7bf36c0cc3c2874c15 (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
# 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 }}"