{% set yaenv = grains['yandex-environment'] -%}
{% if yaenv == 'production' -%}
{% set cry, react, pda, sitemap_path = ('cryprox.yandex.net', 'new.tv.yandex.ru', 'new.pda.tv.yandex.ru', 'https://yastatic.net/s3/tv-frontend/sitemap/production') -%}
{% elif yaenv == 'prestable' -%}
{% set cry, react, pda, sitemap_path = ('cryprox.yandex.net', 'new.beta.tv.yandex.ru', 'new.pda.beta.tv.yandex.ru', 'http://tv-frontend.s3.mdst.yandex.net/sitemap/prestable') -%}
{% else -%}
{% set cry, react, pda, sitemap_path = ('cryprox-test.yandex.net', 'new.testing.tv.yandex.ru', 'new.pda.testing.tv.yandex.ru', 'http://tv-frontend.s3.mdst.yandex.net/sitemap/testing') -%}
{% endif -%}
upstream aab_upstream {
    server {{cry}}:80 max_fails=3;
    server localhost:80 backup;
    keepalive 32;
}

# new tv front in qloud - touch and desktop
upstream react_tv_front {
    server {{react}}:443 max_fails=3;
    keepalive 32;
}

upstream pda_tv_front {
    server {{pda}}:443 max_fails=3;
    keepalive 32;
}
