openwisp / ansible-wireguard-openwisp

BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

[change] Move Python dependencies to requirements.txt #52

Open pandafy opened 3 weeks ago

pandafy commented 3 weeks ago

Move Python dependencies from pip.yml to a requirements.txt file.

Ensure that dependabot can upgrade the dependencies in requirements.txt.

pandafy commented 3 weeks ago

We can use the following tasks to implement this

- name: Read local requirements.txt and install packages
  local_action: command cat /path/to/requirements.txt
  register: requirements

- name: Install Python modules from requirements.txt
  pip:
    name: "{{ requirements.stdout_lines }}"
    state: present
  become: yes