diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ef55bc..bff80d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,7 @@ --- name: CI -'on': +on: + workflow_dispatch: pull_request: push: branches: diff --git a/tasks/main.yml b/tasks/main.yml index cdb8720..4a85cc4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,11 +4,20 @@ name: "{{ pip_package }}" state: present + +- name: Ensure virtualenv is installed (via pip) + pip: + name: virtualenv + executable: "{{ pip_executable }}" + break_system_packages: true + + - name: Remove EXTERNALLY-MANAGED ansible.builtin.file: path: /usr/lib/python3.{{ ansible_python.version.minor }}/EXTERNALLY-MANAGED state: absent + - name: Ensure pip_install_packages are installed. pip: name: "{{ item.name | default(item) }}" @@ -17,4 +26,6 @@ state: "{{ item.state | default(omit) }}" extra_args: "{{ item.extra_args | default(omit) }}" executable: "{{ item.virtualenv | default(false) | ternary(omit, pip_executable) }}" + virtualenv_site_packages: "{{ item.virtualenv_site_packages | default(omit) }}" + break_system_packages: "{{ item.break_system_packages | default(omit) }}" loop: "{{ pip_install_packages }}"