---
- name: install docker
  sudo: yes
  yum:
    name: http://cbs.centos.org/kojifiles/packages/docker/1.5.0/1.el7/x86_64/docker-1.5.0-1.el7.x86_64.rpm
    state: present

- name: configure docker consul dns
  sudo: yes
  lineinfile:
    dest: /etc/sysconfig/docker 
    regexp: ^OPTIONS
    line: OPTIONS=--selinux-enabled -H fd:// --dns {{ ansible_default_ipv4.address }}  --dns-search service.consul
    state: present

- name: enable docker
  sudo: yes
  service:
    name: docker
    enabled: yes
    state: started

---
- name: install docker
  sudo: yes
  yum:
    name: http://cbs.centos.org/kojifiles/packages/docker/1.5.0/1.el7/x86_64/docker-1.5.0-1.el7.x86_64.rpm
    state: present

- name: configure docker consul dns
  sudo: yes
  lineinfile:
    dest: /etc/sysconfig/docker-network
    regexp: ^DOCKER_NETWORK_OPTIONS
    line: DOCKER_NETWORK_OPTIONS='--dns {{ ansible_default_ipv4.address }} --dns-search service.consul'
    state: present

- name: enable docker
  sudo: yes
  service:
    name: docker
    enabled: yes
    state: started

Update docker network options for 1.5
Update docker network options for 1.5
