openstack-ansible-os_congress/tasks/congress_install.yml

57 lines
1.6 KiB
YAML

---
# Copyright 2017, taseer94@gmail.com
# All rights reserved.
#
# 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.
- debug:
msg: "This script will install Congress"
- name: clone requirements repository
git:
repo: "{{ congress_requirements_git_repo }}"
dest: "/opt/requirements"
clone: yes
update: yes
- name: create venv directory
file:
path: /openstack/venvs/congress/bin
state: directory
- name: install pip packages
pip:
name: "{{ congress_requires_pip_packages }}"
state: present
virtualenv: "/openstack/venvs/congress/"
- name: get venv checksum
stat:
path: "/var/cache/{{ congress_venv_download_url | basename }}"
get_md5: False
register: local_venv_stat
- name: get remote venv checksum
uri:
url: "{{ congress_venv_download_url | replace('tgz', 'checksum')}}"
return_content: True
- name: attempt venv download
get_url:
url: "{{ congress_venv_download_url }}"
dest: "/var/cache/{{ congress_venv_download_url | basename }}"
ignore_errors: true
register: tacker_get_venv
- name: generating the configuration
shell: tox -egenconfig