#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/%(infrastructure)s.yml

environments:
  development:
    performer:
      provider: ssh
      specific:
        hostname: 192.168.56.100
        username: codev
        password: codev
    isolation: lxc
#    instalace?
#    spustitelny script? - napr pro konfiguraci vpn
    infrastructures:
      full:
        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

      simple:
        machines:
          webservers:
            provider: lxc
            specific:
              distribution:
              release:
              number: 1
          databases:
            provider: real
            specific:
              hosts: [10.0.1.5]

    installations:
      - repository
      - actual

  staging:
    infrastructures:
      - simple
#    branches:
#      - staging/*
#      - *-staging
  production:
    perfomer: ssh://codev:codev@192.168.1.13
    isolation: lxc
    protected: true
    infrastructures:
      full:
        machines:
          webservers:
            provision: real
            host: 10.0.1.5
        scripts:
          before:
            try:
              - first scripts
              - sdasdsad
            except:
              - on error scripts
              - sad sa
            else:
              - on success scripts
            finally:
              - cleanup scripts
          after:

        configuration: standard
#    installations:
#      - svc

    branches:
      - master

    scripts:
      begin:
        - first scripts
      except:
        - error scripts
      else:
        - success scripts
      finally:
        - cleanup scripts

#configuration:
#  provider: ansible
#    version: 1.2
#    inventory: codev://ansible/inventory
#    playbook: provisioning/%(infrastructure)s.yml
