[role/netbox] Add recursive chown task
continuous-integration/drone/push Build is passing Details

Recursively update group-/ownership of netbox directory after unpacking the source and
requiering modules into venv
This commit is contained in:
Jan 2020-09-09 18:12:45 +02:00
parent 09099faaeb
commit 7602303543
1 changed files with 10 additions and 2 deletions

View File

@ -55,8 +55,6 @@
remote_src: yes
creates: '/opt/netbox-{{ netbox_version }}'
# TODO user/group/chown?
- name: Configure netbox
template:
src: configuration.py.j2
@ -70,6 +68,16 @@
virtualenv: '/opt/netbox-{{ netbox_version }}/venv'
virtualenv_command: '/usr/bin/python3 -m venv'
- name: Netbox file permissions
file:
path: '/opt/netbox-{{ netbox_version }}'
owner: '{{ netbox_user }}'
group: '{{ netbox_group }}'
mode: preserve
state: directory
recursive: yes
create: no
# TODO - still manual work
# * Run Database Migrations
# * Create a Super User