- name: make the app be real
  hosts: os_control[0]:os_control_stg[0]
  user: root
  gather_facts: False

  vars_files:
    - /srv/web/infra/ansible/vars/global.yml
    - "/srv/private/ansible/vars.yml"
    - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml

  roles:
  - role: openshift/project
    app: transtats
    description: transtats
    appowners:
    - suanand
  - role: openshift/object
    app: transtats
    objectname: secret.yml
    template: secret.yml
  - role: openshift/imagestream
    app: transtats
    imagename: transtats
  - role: openshift/object
    app: transtats
    template: buildconfig.yml
    objectname: buildconfig.yml
  - role: openshift/start-build
    app: transtats
    buildname: transtats-build
  - role: openshift/object
    app: transtats
    file: service.yml
    objectname: service.yml
  - role: openshift/route
    app: transtats
    routename: transtats-web
    host: transtats{{ env_suffix }}.fedoraproject.org
    file: route.yml
    serviceport: web
    servicename: transtats-web
    annotations:
      haproxy.router.openshift.io/timeout: 8m
  - role: openshift/object
    app: transtats
    file: deploymentconfig.yml
    objectname: deploymentconfig.yml
  - role: openshift/rollout
    app: transtats
    dcname: transtats-web
