Add custom configuration

This commit is contained in:
Andrew Ying 2023-11-19 22:48:21 +00:00
parent a910018c0b
commit 184e92f729
2 changed files with 10 additions and 0 deletions

View file

@ -60,3 +60,5 @@ netbox_timezone: GMT
netbox_server_host: 127.0.0.1
netbox_server_port: 8001
netbox_server_workers: "{{ ansible_processor_nproc * 2 + 1 }}"
netbox_custom_config: {}

View file

@ -235,3 +235,11 @@ TIME_FORMAT = 'g:i a'
SHORT_TIME_FORMAT = 'H:i:s'
DATETIME_FORMAT = 'N j, Y g:i a'
SHORT_DATETIME_FORMAT = 'Y-m-d H:i'
{% for key, value in netbox_custom_config.items() %}
{% if value is boolean %}
{{ key | upper }} = {{ value | capitalize }}
{% else %}
{{ key | upper }} = {{ value | tojson(4) }}
{% endif %}
{% endfor %}