Paul Belanger 1387bf009f Expand pip options for boto3 install
This brings the role more inline with other windmill roles.

Change-Id: Ib97bdae004fd7fcbe4b06564d88423f64e5b2bca
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2020-05-04 10:13:53 -04:00

51 lines
1.7 KiB
YAML

# Copyright 2020 Red Hat, Inc.
#
# 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 boto3 using pip
become: true
pip:
executable: "{{ boto3_pip_executable|default(omit) }}"
editable : "{{ boto3_pip_editable|default(omit) }}"
extra_args: "{{ boto3_pip_extra_args|default(omit) }}"
name: "{{ boto3_pip_name }}"
version: "{{ boto3_pip_version|default(omit) }}"
virtualenv_python: "{{ boto3_pip_virtualenv_python|default(omit) }}"
virtualenv: "{{ boto3_pip_virtualenv|default(omit) }}"
- name: Stat boto3_pip_virtualenv_symlink
stat:
path: "{{ boto3_pip_virtualenv_symlink | dirname }}"
register: r
when: boto3_pip_virtualenv_symlink is defined
- name: Create boto3_pip_virtualenv_symlink directory
become: true
file:
state: directory
path: "{{ boto3_pip_virtualenv_symlink | dirname }}"
when:
- boto3_pip_virtualenv_symlink is defined
- not r.stat.exists
- name: Symlink boto3 virtualenv
become: true
file:
dest: "{{ boto3_pip_virtualenv_symlink }}"
src: "{{ boto3_pip_virtualenv }}"
state: link
when:
- boto3_pip_virtualenv is defined
- boto3_pip_virtualenv_symlink is defined
- boto3_pip_virtualenv != boto3_pip_virtualenv_symlink