---
# This is an input variables file automatically generated for use with the
# 'ha_cluster' linux system role.
#
# Created by: {{ ansible_role_name }}

# The name of the cluster
ha_cluster_cluster_name: {{ __sap_ha_pacemaker_cluster_cluster_name }}

{% if __sap_ha_pacemaker_cluster_cluster_properties is defined and __sap_ha_pacemaker_cluster_cluster_properties|length > 0 %}
# Properties that enable and control cluster behavior
ha_cluster_cluster_properties:
{{ __sap_ha_pacemaker_cluster_cluster_properties | to_nice_yaml(indent=2) }}
{%- endif %}

{% if __sap_ha_pacemaker_cluster_constraints_colocation is defined and __sap_ha_pacemaker_cluster_constraints_colocation|length > 0 %}
# Definition of resources which depend on other resources
ha_cluster_constraints_colocation:
{{ __sap_ha_pacemaker_cluster_constraints_colocation | to_nice_yaml(indent=2) }}
{%- endif -%}

{% if __sap_ha_pacemaker_cluster_constraints_location is defined and __sap_ha_pacemaker_cluster_constraints_location|length > 0 %}
# Definition of resources which have specific location dependencies or preferences
ha_cluster_constraints_location:
{{ __sap_ha_pacemaker_cluster_constraints_location | to_nice_yaml(indent=2) }}
{%- endif %}

{% if __sap_ha_pacemaker_cluster_constraints_order is defined and __sap_ha_pacemaker_cluster_constraints_order|length > 0 %}
# Definition of an order in which resources must be started.
# They are automatically stopped in reverse order.
ha_cluster_constraints_order:
{{ __sap_ha_pacemaker_cluster_constraints_order | to_nice_yaml(indent=2) }}
{%- endif %}

{% if __sap_ha_pacemaker_cluster_extra_packages is defined and __sap_ha_pacemaker_cluster_extra_packages|length > 0 %}
# Extra packages that are needed for this HA environment
ha_cluster_extra_packages:
{{ __sap_ha_pacemaker_cluster_extra_packages | to_nice_yaml(indent=2) }}
{%- endif %}

{% if __sap_ha_pacemaker_cluster_fence_agent_packages is defined and __sap_ha_pacemaker_cluster_fence_agent_packages|length > 0 %}
# Fence agent package(s) for this HA environment
ha_cluster_fence_agent_packages:
{{ __sap_ha_pacemaker_cluster_fence_agent_packages | to_nice_yaml(indent=2) }}
{%- endif %}

{% if __sap_ha_pacemaker_cluster_repos is defined and __sap_ha_pacemaker_cluster_repos|length > 0 %}
# Definition of repositories to enable (if disable) to ensure
# access to all required packages
__ha_cluster_repos:
{{ __sap_ha_pacemaker_cluster_repos | to_nice_yaml(indent=2) }}
{%- endif %}

{% if __sap_ha_pacemaker_cluster_resource_clones is defined and __sap_ha_pacemaker_cluster_resource_clones|length > 0 %}
# Definition of resources that are cloned and monitored on all nodes
ha_cluster_resource_clones:
{{ __sap_ha_pacemaker_cluster_resource_clones | to_nice_yaml(indent=2) }}
{%- endif %}

{% if __sap_ha_pacemaker_cluster_resource_groups is defined and __sap_ha_pacemaker_cluster_resource_groups|length > 0 %}
# Definition of resources that are grouped together
ha_cluster_resource_groups:
{{ __sap_ha_pacemaker_cluster_resource_groups | to_nice_yaml(indent=2) }}
{%- endif %}

{% if __sap_ha_pacemaker_cluster_resource_primitives is defined and __sap_ha_pacemaker_cluster_resource_primitives|length > 0 %}
# Definition of all cluster resources
ha_cluster_resource_primitives:
{{ __sap_ha_pacemaker_cluster_resource_primitives | to_nice_yaml(indent=2) }}
{%- endif %}
