Skip to content

Commit

Permalink
Merge branch 'feature/set-media-path' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
lae committed Jul 11, 2017
2 parents 323de2d + f958689 commit 78c9d0e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tasks/deploy_netbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
with_items:
- "{{ netbox_releases_path }}"
- "{{ netbox_shared_path }}"
- "{{ netbox_shared_path }}/media/image-attachments"

- include: "install_via_{{ 'git' if netbox_git else 'stable' }}.yml"

Expand Down Expand Up @@ -57,6 +58,15 @@
notify:
- reload netbox.service

- name: Set MEDIA_ROOT to shared media directory
lineinfile:
path: "{{ netbox_config_path }}/settings.py"
regexp: '^MEDIA_ROOT\s*='
line: 'MEDIA_ROOT = "{{ netbox_shared_path }}/media/"'
state: present
notify:
- reload netbox.service

- name: Run database migrations for NetBox
django_manage:
command: migrate
Expand Down

0 comments on commit 78c9d0e

Please sign in to comment.