{% if policy.properties.master is defined %}
    {% if policy.properties.master.properties is not defined %}
                    <master/>
                {% else %}
                    <master>
                        {% if policy.properties.master.properties.cluster_name is defined %}
                        <cluster-name>{{ policy.properties.master.properties.cluster_name  }}</cluster-name>
                        {% endif %}
                        {% if policy.properties.master.properties.group_name is defined %}
                        <group-name>{{ policy.properties.master.properties.group_name  }}</group-name>
                        {% endif %}
                        {% if policy.properties.master.properties.vote_on_replication_failure is defined %}
                        <vote-on-replication-failure>{{ mbool(policy.properties.master.properties.vote_on_replication_failure)  }}</vote-on-replication-failure>
                        {% endif %}
                        {% if policy.properties.master.properties.check_for_live_server is defined %}
                        <check-for-live-server>{{ mbool(policy.properties.master.properties.check_for_live_server) }}</check-for-live-server>
                        {% endif %}
                        {% if policy.properties.master.properties.initial_replication_sync_timeout is defined %}
                        <initial-replication-sync-timeout>{{ policy.properties.master.properties.initial_replication_sync_timeout  }}</initial-replication-sync-timeout>
                        {% endif %}
                    </master>
    {% endif %}
{% endif %}
