{% set interface = swift_replication_interface if 'replicat' in service_name else swift_storage_interface %}
[DEFAULT]
bind_ip = {{ hostvars[inventory_hostname]['ansible_' + interface]['ipv4']['address'] }}
bind_port = {{ swift_object_server_port }}
devices = {{ swift_devices_mount_point }}
mount_check = false

log_udp_host = {{ syslog_server }}
log_udp_port = {{ syslog_udp_port }}
log_name = {{ service_name }}
log_facility = {{ syslog_swift_facility }}
log_level = {{ swift_log_level }}
workers = {{ openstack_service_workers }}

[pipeline:main]
{% if service_name == 'swift-object-expirer' %}
pipeline = proxy-server
{% else %}
pipeline = object-server
{% endif %}

[app:object-server]
use = egg:swift#object
{% if swift_has_replication_network %}
replication_server = {{ service_name == 'swift-object-replication-server' }}
{% endif %}

{% if service_name == 'swift-object-auditor' %}
[object-auditor]
{% endif %}

[object-replicator]
{% if service_name == 'swift-object-replicator' %}
rsync_module = {replication_ip}::object
{% endif %}

{% if service_name == 'swift-object-updater' %}
[object-updater]
{% endif %}

{% if service_name == 'swift-object-expirer' %}
[object-expirer]

[app:proxy-server]
use = egg:swift#proxy
{% endif %}
