From 8bbca0e12049d9a2d12853eb251f6d7b5dc16f06 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Sun, 28 Aug 2016 13:11:48 -0400 Subject: [PATCH] Simplify pip install options Using the omit template, we can now better control which pip options we set. Change-Id: I8a3abc0b623a75e1f695441f96b922a2a72e41f7 Signed-off-by: Paul Belanger --- defaults/main.yaml | 5 ++++- tasks/install/git.yaml | 2 ++ tasks/install/pip.yaml | 13 ++++--------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/defaults/main.yaml b/defaults/main.yaml index 7fe4605..cc06884 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -67,7 +67,10 @@ zuul_git_version: master zuul_install_method: git -zuul_pip_version: +zuul_pip_name: zuul +#zuul_pip_extra_args: +#zuul_pip_version: +#zuul_pip_virtualenv: # tasks/service.yaml zuul_file_zuul_service_config_group: root diff --git a/tasks/install/git.yaml b/tasks/install/git.yaml index af0cd15..a58e077 100644 --- a/tasks/install/git.yaml +++ b/tasks/install/git.yaml @@ -22,4 +22,6 @@ - name: Pip install zuul from local git repo. become: yes pip: + extra_args: "{{ zuul_pip_extra_args|default(omit) }}" name: "file://{{ zuul_git_dest }}" + virtualenv: "{{ zuul_pip_virtualenv|default(omit) }}" diff --git a/tasks/install/pip.yaml b/tasks/install/pip.yaml index fdf4eea..2941c7e 100644 --- a/tasks/install/pip.yaml +++ b/tasks/install/pip.yaml @@ -15,12 +15,7 @@ - name: Install zuul using pip. become: yes pip: - name: zuul - when: zuul_pip_version is none - -- name: Install zuul using pip. - become: yes - pip: - name: zuul - version: "{{ zuul_pip_version }}" - when: zuul_pip_version is not none + extra_args: "{{ zuul_pip_extra_args|default(omit) }}" + name: "{{ zuul_pip_name }}" + version: "{{ zuul_pip_version|default(omit) }}" + virtualenv: "{{ zuul_pip_virtualenv|default(omit) }}"