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