---

- hosts: tag_Name_es_proxy_production:tag_Name_metrics_es_proxy_production
  name: setup elasticsearch proxy
  roles:
    - role: docker-host
      docker_storage_driver: aufs
      tags: docker
  tasks:
    - name:
      docker_service:
        project_name: teeproxy
        state: present
        pull: yes
        definition:
          version: '2'
          services:
            teeproxy:
              image: "docker-registry.zooxlabs.com/teeproxy"
              restart: unless-stopped
              ports:
                - "9200:9200"
              command: -l=:9200 -a="{{source_es}}" -b="{{target_es}}" -a.timeout 10 -b.timeout 10 -debug={{proxy_debug}}
      tags: teeproxy
