updated netbox state

This commit is contained in:
Paul 2022-06-08 23:49:12 +02:00
parent 1392cf0c20
commit 3b9cbac7ea
4 changed files with 9 additions and 6 deletions

View File

@ -94,3 +94,6 @@ netbox:
short_time_format: "H:i:s" short_time_format: "H:i:s"
datetime_format: "N j, Y g:i a" datetime_format: "N j, Y g:i a"
short_datetime_format: "Y-m-d H:i" short_datetime_format: "Y-m-d H:i"
csrf_trusted_origins:
- 'https://*.mydomain.com'
- 'https://*.127.0.0.1'

View File

@ -22,7 +22,7 @@ netbox-install-link:
netbox-virtualenv: netbox-virtualenv:
virtualenv.managed: virtualenv.managed:
- name: {{ netbox.install_dir }}/netbox - name: {{ netbox.install_dir }}/netbox/.venv
- requirements: {{ netbox.install_dir }}/netbox/requirements.txt - requirements: {{ netbox.install_dir }}/netbox/requirements.txt
- python: /usr/bin/python3 - python: /usr/bin/python3
- require: - require:
@ -31,7 +31,7 @@ netbox-virtualenv:
netbox-gunicorn-pkg: netbox-gunicorn-pkg:
pip.installed: pip.installed:
- name: gunicorn - name: gunicorn
- bin_env: {{ netbox.install_dir }}/netbox/bin/pip3 - bin_env: {{ netbox.install_dir }}/netbox/.venv/bin/pip3
- require: - require:
- virtualenv: netbox-virtualenv - virtualenv: netbox-virtualenv
@ -62,7 +62,7 @@ netbox-migration:
- name: django.migrate - name: django.migrate
- settings_module: netbox.settings - settings_module: netbox.settings
- pythonpath: {{ netbox.install_dir }}/netbox/netbox - pythonpath: {{ netbox.install_dir }}/netbox/netbox
- bin_env: {{ netbox.install_dir }}/netbox/bin/django-admin - bin_env: {{ netbox.install_dir }}/netbox/.venv/bin/django-admin
- require: - require:
- virtualenv: netbox-virtualenv - virtualenv: netbox-virtualenv
@ -71,7 +71,7 @@ netbox-install-static-files:
- name: django.collectstatic - name: django.collectstatic
- settings_module: netbox.settings - settings_module: netbox.settings
- pythonpath: {{ netbox.install_dir }}/netbox/netbox - pythonpath: {{ netbox.install_dir }}/netbox/netbox
- bin_env: {{ netbox.install_dir }}/netbox/bin/django-admin - bin_env: {{ netbox.install_dir }}/netbox/.venv/bin/django-admin
- require: - require:
- virtualenv: netbox-virtualenv - virtualenv: netbox-virtualenv

View File

@ -1,7 +1,7 @@
{%- from "netbox/map.jinja" import netbox with context -%} {%- from "netbox/map.jinja" import netbox with context -%}
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }} ## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
command = '{{ netbox.install_dir }}/netbox/bin/gunicorn' command = '{{ netbox.install_dir }}/netbox/.venv/bin/gunicorn'
pythonpath = '{{ netbox.install_dir }}/netbox/netbox' pythonpath = '{{ netbox.install_dir }}/netbox/netbox'
bind = '{{ netbox.gunicorn.bind_addr }}:{{ netbox.gunicorn.bind_port }}' bind = '{{ netbox.gunicorn.bind_addr }}:{{ netbox.gunicorn.bind_port }}'
workers = 3 workers = 3

View File

@ -8,7 +8,7 @@ After=network.target postgresql.service redis.service
Type=notify Type=notify
NotifyAccess=all NotifyAccess=all
LimitNOFILE=8192 LimitNOFILE=8192
ExecStart={{ netbox.install_dir }}/netbox/bin/gunicorn -c {{ netbox.install_dir }}/netbox/gunicorn.py netbox.wsgi ExecStart={{ netbox.install_dir }}/netbox/.venv/bin/gunicorn -c {{ netbox.install_dir }}/netbox/gunicorn.py netbox.wsgi
KillMode=process KillMode=process
Restart=on-failure Restart=on-failure
RestartSec=15 RestartSec=15