Skip to content

Commit b9eda0d

Browse files
authored
Merge pull request #195 from sol1-matt/feature/193_local_requirements_file
Copy additionally installed Python packages to local_requirements.txt
2 parents a4b901c + 4503039 commit b9eda0d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tasks/deploy_netbox.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@
8686
- restart netbox.service
8787
- restart netbox-rqworker.service
8888

89+
# local_requirements.txt
90+
- name: Copy selected optional Python dependencies to local_requirements.txt
91+
ansible.builtin.copy:
92+
content: |
93+
{% for dep in _netbox_python_deps %}
94+
{{ dep }}
95+
{% endfor %}
96+
dest: "{{ netbox_current_path }}/local_requirements.txt"
97+
owner: "{{ netbox_user }}"
98+
group: "{{ netbox_group }}"
99+
when: (_netbox_python_deps | length) > 0
100+
89101
- name: NetBox Configuration
90102
block:
91103
# configuration.py

0 commit comments

Comments
 (0)