From 63c794fddb026b405d7f0730011ae9887b48c698 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Tue, 30 May 2017 15:01:14 -0400 Subject: [PATCH] Create diskimage_builder_pip_virtualenv_python Allow the user to pick the version of python needed for the virtualenv. Change-Id: I2e544f8bdd48cdbdb973dec844a2a9b56c473aae Signed-off-by: Paul Belanger --- defaults/main.yaml | 1 + tasks/install/pip.yaml | 1 + tests/inventory | 4 ++-- tests/test.yaml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/defaults/main.yaml b/defaults/main.yaml index 012c0f1..a36c6db 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -27,4 +27,5 @@ diskimage_builder_install_method: git diskimage_builder_pip_name: diskimage-builder # diskimage_builder_pip_extra_args: # diskimage_builder_pip_version: +# diskimage_builder_pip_virtualenv_python: # diskimage_builder_pip_virtualenv: diff --git a/tasks/install/pip.yaml b/tasks/install/pip.yaml index 6e0b33f..fd4b3ce 100644 --- a/tasks/install/pip.yaml +++ b/tasks/install/pip.yaml @@ -18,4 +18,5 @@ extra_args: "{{ diskimage_builder_pip_extra_args|default(omit) }}" name: "{{ diskimage_builder_pip_name }}" version: "{{ diskimage_builder_pip_version|default(omit) }}" + virtualenv_python: "{{ diskimage_builder_pip_virtualenv_python|default(omit) }}" virtualenv: "{{ diskimage_builder_pip_virtualenv|default(omit) }}" diff --git a/tests/inventory b/tests/inventory index e512180..59f3595 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,2 +1,2 @@ -[test] -test01 ansible_host=127.0.0.2 +[all] +localhost ansible_connection=ssh diff --git a/tests/test.yaml b/tests/test.yaml index 7fffa6e..3a782e4 100644 --- a/tests/test.yaml +++ b/tests/test.yaml @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. --- -- hosts: test +- hosts: localhost vars: rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}" pre_tasks: