Skip to content

Commit

Permalink
enh: Use latest pip/setuptools in virtualenv
Browse files Browse the repository at this point in the history
  • Loading branch information
smutel committed Mar 25, 2022
1 parent 2a0dd1f commit c8d8828
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tasks/deploy_netbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,25 @@
owner: "{{ netbox_user }}"
group: "{{ netbox_group }}"

- name: Create NetBox virtualenv and install needed Python dependencies
- name: Create NetBox virtualenv
pip:
name:
- pip
- setuptools
state: latest
virtualenv: "{{ netbox_virtualenv_path }}"
virtualenv_command: "{{ netbox_python_binary }} -m venv"
become: true
become_user: "{{ netbox_user }}"
retries: 2
register: _netbox_virtualenv_setup
until: _netbox_virtualenv_setup is succeeded

- name: Install needed Python dependencies
pip:
requirements: "{{ netbox_current_path }}/requirements.txt"
extra_args: "-c {{ netbox_current_path }}/constraints.txt"
virtualenv: "{{ netbox_virtualenv_path }}"
virtualenv_command: "{{ netbox_python_binary }} -m venv"
become: true
become_user: "{{ netbox_user }}"
retries: 2
Expand Down

0 comments on commit c8d8828

Please sign in to comment.