diff --git a/defaults/main.yaml b/defaults/main.yaml index 8b1ee37..918638f 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -30,3 +30,4 @@ diskimage_builder_pip_name: diskimage-builder # diskimage_builder_pip_version: # diskimage_builder_pip_virtualenv_python: # diskimage_builder_pip_virtualenv: +# diskimage_builder_pip_virtualenv_symlink: diff --git a/tasks/install/pip.yaml b/tasks/install/pip.yaml index c83f4ae..b8c0f3b 100644 --- a/tasks/install/pip.yaml +++ b/tasks/install/pip.yaml @@ -20,3 +20,14 @@ version: "{{ diskimage_builder_pip_version|default(omit) }}" virtualenv_python: "{{ diskimage_builder_pip_virtualenv_python|default(omit) }}" virtualenv: "{{ diskimage_builder_pip_virtualenv|default(omit) }}" + +- name: Symlink diskimage-builder virtualenv + become: true + file: + src: "{{ diskimage_builder_pip_virtualenv }}" + dest: "{{ diskimage_builder_pip_virtualenv_symlink }}" + state: link + when: + - diskimage_builder_pip_virtualenv is defined + - diskimage_builder_pip_virtualenv_symlink is defined + - diskimage_builder_pip_virtualenv != diskimage_builder_pip_virtualenv_symlink