* Add playbook dns to manage internal dns master servers * Add role to manage PowerDNS Admin Web Frontend for PowerDNS * Move dns zone related data from mesh list to a simpler dict with a simple zone list * Update role service-bind-slave * Update Readme.md * Add requirements.yml * Update .gitignore
52 lines
1.5 KiB
Django/Jinja
52 lines
1.5 KiB
Django/Jinja
import os
|
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
{% if pdns_admin_global_config is defined %}
|
|
{% for key, value in pdns_admin_global_config.items() %}
|
|
{% if key | upper not in ["UPLOAD_DIR"] %}
|
|
{% if value is not mapping %}
|
|
{% if value is sequence and value is not string %}
|
|
{% if value[0] is number %}
|
|
{{ key | upper }} = [ {{ value|join(', ') }} ]
|
|
{% else %}
|
|
{{ key | upper }} = [ "{{ value|join('", "') }}" ]
|
|
{% endif %}
|
|
{% else %}
|
|
{% if value == "true" or value == "false" or value is number %}
|
|
{{ key | upper }} = {{ value }}
|
|
{% else %}
|
|
{{ key | upper }} = "{{ value }}"
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
# Upload
|
|
UPLOAD_DIR = os.path.join(basedir, 'upload')
|
|
{% endif %}
|
|
|
|
{% if pdns_admin_database_config is defined %}
|
|
{% for key, value in pdns_admin_database_config.items() %}
|
|
{% if key | upper not in ["SQLALCHEMY_DATABASE_URI", "SQLALCHEMY_MIGRATE_REPO"] %}
|
|
{% if value is not mapping %}
|
|
{% if value is sequence and value is not string %}
|
|
{% if value[0] is number %}
|
|
{{ key | upper }} = [ {{ value|join(', ') }} ]
|
|
{% else %}
|
|
{{ key | upper }} = [ "{{ value|join('", "') }}" ]
|
|
{% endif %}
|
|
{% else %}
|
|
{% if value == "true" or value == "false" or value is number %}
|
|
{{ key | upper }} = {{ value }}
|
|
{% else %}
|
|
{{ key | upper }} = "{{ value }}"
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
SQLALCHEMY_DATABASE_URI = 'mysql://'+SQLA_DB_USER+':'\
|
|
+SQLA_DB_PASSWORD+'@'+SQLA_DB_HOST+'/'+SQLA_DB_NAME
|
|
{% endif %}
|
|
|
|
SAML_ENABLED = False
|