From 665c2e6213866452e5ee9e3914856e7ad96367d8 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Thu, 6 Dec 2018 20:38:27 -0500 Subject: [PATCH] Add support to install via package Change-Id: I76e16413e9f9a4da50019c0d7384cf29f923f7b1 Signed-off-by: Paul Belanger --- defaults/main.yaml | 2 ++ tasks/install/package.yaml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 tasks/install/package.yaml diff --git a/defaults/main.yaml b/defaults/main.yaml index 74e2122..fc80509 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -23,6 +23,8 @@ virtualenv_git_version: master virtualenv_install_method: git +virtualenv_package_name: python3-virtualenv + virtualenv_pip_name: virtualenv #virtualenv_pip_extra_args: #virtualenv_pip_version: diff --git a/tasks/install/package.yaml b/tasks/install/package.yaml new file mode 100644 index 0000000..8a44767 --- /dev/null +++ b/tasks/install/package.yaml @@ -0,0 +1,19 @@ +# Copyright 2018 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 virtualenv from package + become: yes + package: + name: "{{ virtualenv_package_name }}" + state: present