bifrost/playbooks/roles/bifrost-ironic-install/tasks/pip_install.yml
stephane b572da6804 Syntax changes for use of pip_install
Syntax changes for consistency as follows:
- Change parameter=value syntax to parameter: value in
pip_install.yml
- Change "== false" to "| bool == false", also for
consistency.

Change-Id: I728b44243910c7c5556df529e1a3291655903883
2015-12-21 13:56:05 -08:00

29 lines
1.2 KiB
YAML

# Copyright (c) 2015 Hewlett Packard Enterprise Development LP.
#
# 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: "{{ virtualenv | default(omit) }}"
when: source_install is not defined or (source_install | bool == 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)