diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 40a1195..4f7dc24 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -48,7 +48,8 @@ pip: name: "{{ docker_pip_package }}" state: "{{ docker_pip_package_state }}" - extra_args: "--target {{ docker_python_package_path }}" + virtualenv: "{{ docker_python_package_path }}" + virtualenv_python: "python{{ ansible_python_version | regex_search('\\d+\\.\\d+') }}" version: "{{ docker_pip_package_version }}" become: true changed_when: false diff --git a/roles/docker_compose/tasks/main.yml b/roles/docker_compose/tasks/main.yml index da96dec..2aa4a48 100644 --- a/roles/docker_compose/tasks/main.yml +++ b/roles/docker_compose/tasks/main.yml @@ -37,6 +37,7 @@ name: "{{ docker_compose_pip_package }}" state: "{{ docker_compose_pip_package_state }}" virtualenv: "{{ docker_compose_python_package_path }}" + virtualenv_python: "python{{ ansible_python_version | regex_search('\\d+\\.\\d+') }}" version: "{{ docker_compose_pip_package_version | default(omit) }}" become: true changed_when: false