#version: 0.0.5a3
project: hranipex

scripts:
  end to end:
    try:
      - first scripts
    except:
      - on error scripts
    else:
      - on success scripts
    finally:
      - cleanup scripts

infrastructures:
  simple:
    machines:
      webservers:
        distribution: debian
        release: squeeze
      elasticservers:
        distribution: ubuntu
        release: trusty

provision:
  standard:
    provider: ansible
    specific:
      playbooks: provisioning/{nfrastructure}.yml

scripts:
  connect to vpn: connect_vpn.sh {environment} {infrastructure} {installation} {installation_options}


environments:
  development:
    performer:
      provider: ssh
      specific:
        hostname: 192.168.56.100
        username: codev
        password: codev
    isolation:
      provider: lxc
      scripts:
        oncreate:
          - scripts/install_vpnc.sh
        onenter:
          - scripts/connect_vpn.sh
    infrastructures:
      full:
        scripts:
          oncreate:
          onenter:
        connectivity:
          webservers:
            - 80: 80
        machines:
          webservers:
            provider: lxc
            specific:
              distribution: debian
              release: squeeze
              number: 3
          elasticservers:
            provider: real
            specific:
              hosts: [10.0.1.9, 10.0.1.10]
          databases:
            provider: real
            specific:
              hosts:
                - devdbsrv.coex.cz
        provision:
          provider: ansible
          specific:
            version: 2.0
            playbook: provisioning/{infrastructure}.yml
          scripts:
            onstart:
            onsuccess:
            onerror:
      simple:
        machines:
          webservers:
            provider: lxc
            specific:
              distribution:
              release:
              number: 1
          databases:
            provider: real
            specific:
              hosts: [10.0.1.5]

    installations:
      - repository
      - actual
