- name: make the app be real
  hosts: os-masters-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: modernpaste
    description: modernpaste
    appowners:
    - codeblock
  - role: openshift/object
    app: modernpaste
    file: imagestream.yml
  - role: openshift/object
    app: modernpaste
    template: secret.yml
  - role: openshift/object
    app: modernpaste
    template: buildconfig.yml
    objectname: buildconfig.yml
  - role: openshift/start-build
    app: modernpaste
    buildname: modernpaste-docker-build
  - role: openshift/object
    app: modernpaste
    template: configmap.yml
    objectname: configmap.yml
  - role: openshift/object
    app: modernpaste
    file: service.yml
    objectname: service.yml
  - role: openshift/object
    app: modernpaste
    file: route.yml
    routename: modernpaste
    serviceport: web
    servicename: modernpaste
  - role: openshift/object
    app: modernpaste
    file: deploymentconfig.yml
    objectname: deploymentconfig.yml
  - role: openshift/rollout
    app: modernpaste
    dcname: modernpaste-web
