summaryrefslogtreecommitdiffstats
path: root/roles/etcd/tasks/main.yml
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2017-01-22 15:37:12 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2017-02-10 10:53:44 +0100
commit73d91dbcbcd3f2188977ac36e06adf57803b4842 (patch)
treeef6822a7e30c1d16648aba48b33bcc17e1de3387 /roles/etcd/tasks/main.yml
parent599ce1d450a0b7425928e40b9dd7296e5f055586 (diff)
downloadopenshift-73d91dbcbcd3f2188977ac36e06adf57803b4842.tar.gz
openshift-73d91dbcbcd3f2188977ac36e06adf57803b4842.tar.bz2
openshift-73d91dbcbcd3f2188977ac36e06adf57803b4842.tar.xz
openshift-73d91dbcbcd3f2188977ac36e06adf57803b4842.zip
etcd: use as system container
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'roles/etcd/tasks/main.yml')
-rw-r--r--roles/etcd/tasks/main.yml24
1 files changed, 20 insertions, 4 deletions
diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml
index 41f25be70..5f3ca461e 100644
--- a/roles/etcd/tasks/main.yml
+++ b/roles/etcd/tasks/main.yml
@@ -14,13 +14,17 @@
command: docker pull {{ openshift.etcd.etcd_image }}
register: pull_result
changed_when: "'Downloaded newer image' in pull_result.stdout"
- when: etcd_is_containerized | bool
+ when:
+ - etcd_is_containerized | bool
+ - not openshift.common.is_etcd_system_container | bool
- name: Install etcd container service file
template:
dest: "/etc/systemd/system/etcd_container.service"
src: etcd.docker.service
- when: etcd_is_containerized | bool
+ when:
+ - etcd_is_containerized | bool
+ - not openshift.common.is_etcd_system_container | bool
- name: Ensure etcd datadir exists when containerized
file:
@@ -36,10 +40,22 @@
enabled: no
masked: yes
daemon_reload: yes
- when: etcd_is_containerized | bool
+ when:
+ - etcd_is_containerized | bool
+ - not openshift.common.is_etcd_system_container | bool
register: task_result
failed_when: "task_result|failed and 'could not' not in task_result.msg|lower"
+- name: Install etcd container service file
+ template:
+ dest: "/etc/systemd/system/etcd_container.service"
+ src: etcd.docker.service
+ when: etcd_is_containerized | bool and not openshift.common.is_etcd_system_container | bool
+
+- name: Install Etcd system container
+ include: system_container.yml
+ when: etcd_is_containerized | bool and openshift.common.is_etcd_system_container | bool
+
- name: Validate permissions on the config dir
file:
path: "{{ etcd_conf_dir }}"
@@ -54,7 +70,7 @@
dest: /etc/etcd/etcd.conf
backup: true
notify:
- - restart etcd
+ - restart etcd
- name: Enable etcd
systemd: