-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
156 lines (144 loc) · 7.73 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
---
# defaults file for ansible-role-netbox
# Base Configuration
netbox_base_path: /opt/netbox # Root path for netbox's docker-compose file and data store
netbox_docker_path: /usr/local/src/netbox-docker # Path to netbox-docker source repository on the host
netbox_docker_git_url: https://github.com/netbox-community/netbox-docker.git # Netbox docker git repository
netbox_docker_build: false # Build netbox-docker container from source
netbox_force_dockerfile_build: false # Force a rebuild of the netbox container
# Version and Image Configuration
# Netbox and netbox-docker versions and tag
netbox_netbox_version: 4.1
netbox_netbox_docker_version: 3.0.2
netbox_container_tag: v{{ netbox_netbox_version }}-{{ netbox_netbox_docker_version }}
# Netbox docker image and tag
netbox_netbox_image: docker.io/netboxcommunity/netbox:{{ netbox_container_tag }}
# Valkey docker image and tag
netbox_valkey_image: docker.io/valkey/valkey:8.0-alpine
# Postgres docker image and tag
netbox_postgres_image: docker.io/postgres:16-alpine
# Caddy docker image and tag
netbox_caddy_image: docker.io/caddy:2-alpine
# pgBackups docker image and tag
netbox_pgbackups_image: docker.io/prodrigestivill/postgres-backup-local:16-alpine
# Network Configuration
netbox_port: 8080 # Host port to expose netbox on. If blank or null, netbox's port is not exposed
netbox_additional_network_names: "" # Extra external networks to attach to the netbox container
netbox_allowed_hosts: "*" # If set, connections will be restricted to this list of host names (also used in caddy)
# Volume Configuration
# Volume mounts for netbox container
netbox_volumes:
- type: bind
source: "{{ netbox_base_path }}/reports"
target: "{{ netbox_reports_volume_path }}"
read_only: true
- type: bind
source: "{{ netbox_base_path }}/scripts"
target: "{{ netbox_scripts_volume_path }}"
read_only: true
- type: bind
source: "{{ netbox_base_path }}/media"
target: "{{ netbox_media_volume_path }}"
# Secret files to mount into the netbox container
# Format: {name:, path:}
netbox_secrets: []
# Admin Configuration
# Specify one or more name and email address {name: ,email:} representing NetBox administrators. These people will be notified of
# application errors (assuming correct email settings are provided).
netbox_admins: []
netbox_admin_api_token: "" # API token for the default admin user, created on first run
netbox_admin_email: [email protected] # Email of the default admin user, created on first run
netbox_admin_password: admin # Password for the default admin user, created on first run
netbox_admin_username: admin # Username of the default admin user, created on first run
# Database Configuration
netbox_pg_db: netbox # Postgres database name
netbox_pg_host: postgres # Postgres database host. This should not be changed if using the default docker-compose setup.
# Postgres password
netbox_pg_password: >
"{{ lookup(
'ansible.builtin.password', '/tmp/netbox_pg_password.txt', chars=['ascii_letters'], length=16, seed=inventory_hostname + '.netbox_pg_password'
) }}"
netbox_pg_user: netbox # Postgres user
# Redis Configuration
netbox_valkey_host: valkey # Valkey instance host. This should not be changed if using the default docker-compose setup.
# Valkey instance password
netbox_valkey_password: >
"{{ lookup(
'ansible.builtin.password', '/tmp/netbox_valkey_password.txt', chars=['ascii_letters'], length=16, seed=inventory_hostname + '.netbox_valkey_password'
) }}"
netbox_valkey_insecure_skip_tls_verify: false # If true, certificates for valkey are not checked
netbox_valkey_cache_host: valkey-cache # Valkey cache instance host. This should not be changed if using the default docker-compose setup.
# Valkey cache instance password
netbox_valkey_cache_password: >
"{{ lookup(
'ansible.builtin.password',
'/tmp/netbox_valkey_cache_password.txt',
chars=['ascii_letters'],
length=16,
seed=inventory_hostname + '.netbox_valkey_cache_password'
) }}"
netbox_valkey_cache_insecure_skip_tls_verify: false # If true, certificates for valkey cache are not checked
netbox_valkey_cache_ssl: false # If true, communication with valkey is secured with SSL
# Security Configuration
# Netbox secret key. Should be at least 50 characters long
netbox_secret_key: >
"{{ lookup(
'ansible.builtin.password', '/tmp/netbox_secret_key.txt', chars=['ascii_letters'], length=50, seed=inventory_hostname+'.netbox_secret_key'
) }}"
netbox_login_required: false # Whether or not a user must be authenticated to view DCIM details in Netbox
# Web Server Configuration
netbox_use_caddy: false # If set, Caddy will be used to serve Netbox over TLS
netbox_caddy_http_port: 80 # Caddy HTTP port
netbox_caddy_https_port: 443 # Caddy HTTPS port
# Email address to use for letsencrypt automatic certificate generation (mutually exclusive with netbox_ssl_cert_bundle/netbox_ssl_cert_key)
netbox_caddy_letsencrypt_email: ""
netbox_ssl_cert_bundle: "" # Caddy certificate bundle
netbox_ssl_cert_key: "" # Caddy certificate key
# Email Configuration
# Email server settings
# Documentation: https://docs.djangoproject.com/en/3.1/ref/settings/
netbox_email_from: [email protected]
netbox_email_server: localhost
netbox_email_port: 25
netbox_email_username: netbox
netbox_email_password: ""
netbox_email_timeout: 5
netbox_email_use_ssl: false
netbox_email_use_tls: false
netbox_email_certfile: ""
netbox_email_keyfile: ""
# Backup Configuration
netbox_pgbackups_enabled: false # If true, enable pgBackups functionality
netbox_pgbackups_extra_opts: -Z6 --schema=public --blobs # pgBackups extra options
netbox_pgbackups_schedule: "@daily" # pgBackups schedule
# pgBackups retention policy
netbox_pgbackups_keep_days: 7
netbox_pgbackups_keep_weeks: 4
netbox_pgbackups_keep_months: 12
netbox_pgbackups_storage_path: "{{ netbox_base_path }}/backups" # pgBackups storage path
# Application Configuration
netbox_cors_origin_allow_all: true # If set to true, all CORS origins will be allowed
netbox_cors_origin_whitelist: http://localhost # Whitelist of acceptable CORS origin headers
netbox_default_page_size: 250 # Default number of objects for paginated views
netbox_default_timezone: UTC # Default time zone for the Netbox instance
netbox_enforce_global_unique: false # Enforcement of unique IP space within the global table
netbox_graphql_enabled: true # Enable GraphQL API
netbox_housekeeping_interval: 86400 # Interval to run housekeeping worker
netbox_max_page_size: 1000 # Maximum number of objects for paginated API requests
netbox_metrics_enabled: false # Expose Prometheus monitoring metrics at the HTTP endpoint '/metrics'
netbox_webhooks_enabled: true # If true, enable netbox webhooks functionality
# Container Configuration
netbox_container_env: [] # Optional extra container environment variables to apply to the netbox container
netbox_container_labels: [] # Optional extra container labels to apply to the netbox container
netbox_skip_startup_scripts: false # If true, do not run startup scripts on container start
netbox_skip_superuser: false # If true, do not create superuser on container start
# Timezone for the containers, set to an empty string to not set a timezone environment variable
netbox_timezone: UTC
netbox_workers: 1 # Number of netbox worker containers to run (1 or more)
# Extra Configuration
netbox_extra_config: "" # If provided, this string will be rendered in `config/extra.py` as is.
netbox_extra_packages: [] # If provided, these python packages will be installed in the netbox container
# List of netbox plugins to install. Each item should be a dictionary with the keys 'name' (mandatory), 'src' (optional), and 'version' (optional)
netbox_plugins: []
# Configuration for netbox plugins, each key should be the name of a plugin, and the value should be a dictionary of configuration options for that plugin
netbox_plugins_config: {}