--- - name: Start and enable consul service service: name=consul state=started enabled=True register: consul_service_started tags: consul - name: Stop consul-template-consul service service: name: consul-template-consul state: stopped enabled: False when: consul_ct_service.stat.exists tags: consul