Add optional deployment mode for Docker etcd_deployment_type

Running etcd in Docker reduces the number of individual file
downloads and services running on the host.

Note: etcd container v3.0.1 moves bindir to /usr/local/bin

Fixes: #298
This commit is contained in:
Matthew Mosesohn
2016-06-24 15:25:16 +03:00
parent 65ece3bc1d
commit b3282cd0bb
12 changed files with 232 additions and 20 deletions

View File

@@ -3,13 +3,20 @@
command: /bin/true
notify:
- reload systemd
- start etcd
- reload etcd
- name: reload systemd
command: systemctl daemon-reload
when: ansible_service_mgr == "systemd"
- name: start etcd
service:
name: etcd
enabled: yes
state: started
- name: reload etcd
service:
name: etcd
state: restarted
state: "{{ 'restarted' if etcd_deployment_type == 'host' else 'reloaded' }}"