pvc-ansible/roles/pvc/templates/pvc/pvcd.yaml.j2

77 lines
2.5 KiB
Django/Jinja

---
# pvcd cluster configuration
# {{ ansible_managed }}
pvc:
node: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.hostname }}{% endfor %}
functions:
enable_hypervisor: True
enable_networking: True
enable_storage: False
cluster:
coordinators:
{% for node in pvc_nodes if node.is_coordinator %}
- {{ node.hostname }}
{% endfor %}
networks:
cluster:
domain: {{ pvc_cluster_domain }}
network: {{ pvc_cluster_subnet }}
floating_ip: {{ pvc_cluster_floatingip }}
storage:
domain: {{ pvc_storage_domain }}
network: {{ pvc_storage_subnet }}
floating_ip: {{ pvc_storage_floatingip }}
upstream:
domain: {{ pvc_upstream_domain }}
network: {{ pvc_upstream_subnet }}
floating_ip: {{ pvc_upstream_floatingip }}
gateway: {{ pvc_upstream_gatewayip }}
coordinator:
dns:
database:
host: localhost
port: 5432
name: pvcdns
user: pvcdns
pass: PVCdnsPassw0rd
system:
fencing:
intervals:
keepalive_interval: 5
fence_intervals: 6
suicide_intervals: 0
actions:
successful_fence: migrate
failed_fence: None
ipmi:
host: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.ipmi_host }}{% endfor %}
user: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.ipmi_user }}{% endfor %}
pass: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.ipmi_password }}{% endfor %}
migration:
target_selector: mem
configuration:
directories:
dynamic_directory: "/run/pvc"
log_directory: "/var/log/pvc"
console_log_directory: "/var/log/libvirt"
logging:
file_logging: True
stdout_logging: True
console_log_lines: 1000
networking:
devices:
cluster: {{ pvc_cluster_device }}
storage: {{ pvc_storage_device }}
upstream: {{ pvc_upstream_device }}
addresses:
cluster: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.cluster_ip }}/{{ node.cluster_cidr }}{% endfor %}
storage: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.storage_ip }}/{{ node.storage_cidr }}{% endfor %}
upstream: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.upstream_ip }}/{{ node.upstream_cidr }}{% endfor %}