---
# {{ project_name }} - Ansible Inventory
# Generated by typedialog-prov-gen

all:
  vars:
    ansible_user: "{{ ansible_user | default(value="ubuntu") }}"
    ansible_python_interpreter: /usr/bin/python3

  children:
    app_servers:
      hosts:
        {% for i in range(start=1, end=server_count | default(value="1") + 1) %}
        app-{{ i }}:
          ansible_host: "{{ hostvars[\"app-\" ~ i].address | default(value="192.168.1." ~ (100 + i)) }}"
        {% endfor %}

{% if infrastructure.database %}
    database_servers:
      hosts:
        db-1:
          ansible_host: "{{ database_host | default(value="192.168.1.10") }}"
{% endif %}

{% if infrastructure.monitoring contains "prometheus" %}
    monitoring_servers:
      hosts:
        monitoring-1:
          ansible_host: "{{ monitoring_host | default(value="192.168.1.20") }}"
{% endif %}
