Modularize Netbox into several containers with workers n stuff
This commit is contained in:
parent
8d59a1b201
commit
8ecc7bfbb6
@ -1,8 +1,11 @@
|
|||||||
# vim:ft=ansible:
|
# vim:ft=ansible:
|
||||||
- name: docker deploy netbox
|
- name: deploy netbox
|
||||||
|
module_defaults:
|
||||||
docker_container:
|
docker_container:
|
||||||
name: netbox
|
|
||||||
image: netboxcommunity/netbox:v3.0.2
|
image: netboxcommunity/netbox:v3.0.2
|
||||||
|
state: started
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
pull: yes
|
||||||
user: 101
|
user: 101
|
||||||
env:
|
env:
|
||||||
SUPERUSER_EMAIL: rehashedsalt@cock.li
|
SUPERUSER_EMAIL: rehashedsalt@cock.li
|
||||||
@ -20,9 +23,22 @@
|
|||||||
- name: web
|
- name: web
|
||||||
aliases: [ "netbox" ]
|
aliases: [ "netbox" ]
|
||||||
volumes:
|
volumes:
|
||||||
- /data/netbox/startup_scripts:/opt/netbox/startup_scripts:z,ro
|
|
||||||
- /data/netbox/initializers:/opt/netbox/initializers:z,ro
|
|
||||||
- /data/netbox/configuration:/etc/netbox/config:z,ro
|
|
||||||
- /data/netbox/reports:/etc/netbox/reports:z,ro
|
|
||||||
- /data/netbox/media:/opt/netbox/netbox/media:z
|
- /data/netbox/media:/opt/netbox/netbox/media:z
|
||||||
|
block:
|
||||||
|
- name: docker deploy netbox
|
||||||
|
docker_container:
|
||||||
|
name: netbox
|
||||||
|
tags: [ docker, netbox ]
|
||||||
|
- name: docker deploy netbox worker
|
||||||
|
docker_container:
|
||||||
|
name: netbox-worker-1
|
||||||
|
command:
|
||||||
|
- /opt/netbox/venv/bin/python
|
||||||
|
- /opt/netbox/netbox/manage.py
|
||||||
|
- rqworker
|
||||||
|
tags: [ docker, netbox ]
|
||||||
|
- name: docker deploy netbox housekeeping
|
||||||
|
docker_container:
|
||||||
|
name: netbox-housekeeping
|
||||||
|
command: /opt/netbox/housekeeping.sh
|
||||||
tags: [ docker, netbox ]
|
tags: [ docker, netbox ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user