Dmitriy Rabotyagov 887a59256e Use systemd_mount native syntax for mounts
Currently we have bunch of limitations related to the format
of ``glance_nfs_client``. While systemd_mount role is flexible enough
to allow mount cephfs or s3fs, variable format has weird assumptions
that we want to change for better flexability.

Since keys of variable are changing, new name for it was picked to
reflect purpose of the variable better.

Change-Id: Ic0d91a3a873b4253255beac79becf01b4a304695
2022-04-12 12:56:38 +02:00

121 lines
5.3 KiB
Django/Jinja

# {{ ansible_managed }}
[DEFAULT]
# Disable stderr logging
use_stderr = False
debug = {{ debug }}
use_journal = True
fatal_deprecations = {{ glance_fatal_deprecations }}
bind_host = {{ glance_api_bind_address }}
bind_port = {{ glance_api_service_port }}
http_keepalive = {{ glance_http_keepalive }}
digest_algorithm = {{ glance_digest_algorithm }}
backlog = 4096
workers = {{ glance_api_workers | default(glance_api_threads) }}
cinder_catalog_info = volumev3:cinderv3:internalURL
enable_v2_api = {{ glance_enable_v2_api | bool }}
transport_url = {{ glance_oslomsg_rpc_transport }}://{% for host in glance_oslomsg_rpc_servers.split(',') %}{{ glance_oslomsg_rpc_userid }}:{{ glance_oslomsg_rpc_password }}@{{ host }}:{{ glance_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ glance_oslomsg_rpc_vhost }}{% if glance_oslomsg_rpc_use_ssl | bool %}?ssl=1&ssl_version={{ glance_oslomsg_rpc_ssl_version }}&ssl_ca_file={{ glance_oslomsg_rpc_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
scrub_time = 43200
image_cache_dir = {{ glance_system_user_home }}/cache/
image_cache_stall_time = {{ glance_image_cache_stall_time }}
image_cache_max_size = {{ glance_image_cache_max_size }}
# defaults to true if RBD is used as default store
show_image_direct_url = {{ glance_show_image_direct_url }}
show_multiple_locations = {{ glance_show_multiple_locations }}
enabled_backends = {% for backend in _glance_available_stores %}{{ ('name' in backend) | ternary(backend['name'], backend) }}:{{ ('type' in backend) | ternary(backend['type'], backend) }}{% if not loop.last %},{% endif %}{% endfor %}
[task]
task_executor = {{ glance_task_executor }}
[database]
connection = mysql+pymysql://{{ glance_galera_user }}:{{ glance_container_mysql_password }}@{{ glance_galera_address }}/{{ glance_galera_database }}?charset=utf8{% if glance_galera_use_ssl | bool %}&ssl_verify_cert=true{% if glance_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ glance_galera_ssl_ca_cert }}{% endif %}{% endif +%}
max_overflow = {{ glance_db_max_overflow }}
max_pool_size = {{ glance_db_max_pool_size }}
pool_timeout = {{ glance_db_pool_timeout }}
connection_recycle_time = {{ glance_db_connection_recycle_time }}
[keystone_authtoken]
insecure = {{ keystone_service_internaluri_insecure | bool }}
auth_type = {{ glance_keystone_auth_plugin }}
auth_url = {{ keystone_service_adminurl }}
www_authenticate_uri = {{ keystone_service_internaluri }}
project_domain_id = {{ glance_service_project_domain_id }}
user_domain_id = {{ glance_service_user_domain_id }}
project_name = {{ glance_service_project_name }}
username = {{ glance_service_user_name }}
password = {{ glance_service_password }}
region_name = {{ keystone_service_region }}
memcached_servers = {{ glance_memcached_servers }}
token_cache_time = 300
# if your memcached server is shared, use these settings to avoid cache poisoning
memcache_security_strategy = ENCRYPT
memcache_secret_key = {{ memcached_encryption_key }}
[oslo_policy]
policy_file = {{ glance_policy_file }}
policy_default_rule = {{ glance_policy_default_rule }}
policy_dirs = {{ glance_policy_dirs }}
[oslo_messaging_notifications]
topics = notifications
driver = {{ (glance_ceilometer_enabled | bool) | ternary('messagingv2', 'noop') }}
transport_url = {{ glance_oslomsg_notify_transport }}://{% for host in glance_oslomsg_notify_servers.split(',') %}{{ glance_oslomsg_notify_userid }}:{{ glance_oslomsg_notify_password }}@{{ host }}:{{ glance_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ glance_oslomsg_notify_vhost }}{% if glance_oslomsg_notify_use_ssl | bool %}?ssl=1&ssl_version={{ glance_oslomsg_notify_ssl_version }}&ssl_ca_file={{ glance_oslomsg_notify_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
[paste_deploy]
flavor = {{ glance_flavor }}
[glance_store]
default_backend = {{ glance_default_store }}
{% if 'file' in _glance_available_stores %}
[file]
filesystem_store_datadir = {{ glance_system_user_home }}/{{ glance_images_local_directory }}/
{% endif %}
{% if 'swift' in _glance_available_stores %}
[swift]
swift_store_config_file = {{ glance_etc_dir }}/glance-swift-store.conf
default_swift_reference = swift1
swift_store_auth_insecure = {{ glance_swift_store_auth_insecure | bool }}
swift_store_region = {{ glance_swift_store_region }}
swift_store_container = {{ glance_swift_store_container }}
swift_store_create_container_on_put = True
swift_store_large_object_size = {{ glance_swift_store_large_object_size }}
swift_store_large_object_chunk_size = {{ glance_swift_store_large_object_chunk_size }}
swift_store_retry_get_count = 5
swift_store_endpoint_type = {{ glance_swift_store_endpoint_type }}
{% endif %}
{% if 'rbd' in _glance_available_stores %}
[rbd]
rbd_store_pool = {{ glance_rbd_store_pool }}
rbd_store_user = {{ glance_rbd_store_user }}
rbd_store_ceph_conf = /etc/ceph/ceph.conf
rbd_store_chunk_size = {{ glance_rbd_store_chunk_size }}
{% endif %}
[profiler]
enabled = {{ glance_profiler_enabled }}
{% if glance_proxy_headers_parsing | bool %}
[oslo_middleware]
enable_proxy_headers_parsing = True
{% endif %}
{% if glance_cors_allowed_origin is not none %}
[cors]
allow_headers = origin,content-md5,x-image-meta-checksum,x-storage-token,accept-encoding,x-auth-token,x-identity-status,x-roles,x-service-catalog,x-user-id,x-tenant-id,x-openstack-request-id
allow_methods = GET,POST,PUT,PATCH,DELETE
allowed_origin = {{ glance_cors_allowed_origin }}
{% endif %}