bifrost/playbooks/roles/bifrost-keystone-install/tasks/pip_install.yml
Julia Kreger a5c688a9ab Add keystone installation playbook
In order to support use of keystone, bifrost needs to be able to
install keystone in a minimalistic fashion alongside of ironic.

This commit adds the role, and required changes for that
configuration to be bootstrapped.

Change-Id: Icb1c5dfded5574d901444bbca72e5d74a336093f
2016-11-22 14:23:35 +00:00

28 lines
1.2 KiB
YAML

# 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: "Install {{ package }} package from pip"
pip:
name: "{{ package }}"
state: "{{ state | default(omit) }}"
version: "{{ version | default(omit) }}"
virtualenv: "{{ bifrost_venv_dir if enable_venv else omit }}"
when: source_install is not defined or source_install == false
# NOTE (cinerama): We should be able to use the pip module here and
# possibly merge these two tasks when
# https://github.com/ansible/ansible-modules-core/pull/2600 lands.
- name: "Install from {{ sourcedir }} using pip"
command: pip install --upgrade --force-reinstall {{ sourcedir }}
when: source_install is defined and (source_install | bool == true)
environment: "{{ bifrost_venv_env if enable_venv else '{}' }}"