summaryrefslogtreecommitdiffstats
path: root/roles/etcd/tasks
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-03-01 22:17:22 -0500
committerGitHub <noreply@github.com>2017-03-01 22:17:22 -0500
commit2d52f7c89baae452f3012102ac0f22a071f8f4ce (patch)
treefeb36c4dd6e8a04fa14a24d88d36b6dacc0fa213 /roles/etcd/tasks
parent4a3e61e035e42a260e0bf59d1e0c891dc004d50d (diff)
parent58818a6af147e457d56a1faf77b02d37bb538826 (diff)
downloadopenshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.tar.gz
openshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.tar.bz2
openshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.tar.xz
openshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.zip
Merge pull request #3393 from srampal/contiv
Pull request for Contiv Ansible code integration into Openshift Ansible
Diffstat (limited to 'roles/etcd/tasks')
-rw-r--r--roles/etcd/tasks/main.yml46
1 files changed, 43 insertions, 3 deletions
diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml
index 5f3ca461e..17bec5352 100644
--- a/roles/etcd/tasks/main.yml
+++ b/roles/etcd/tasks/main.yml
@@ -26,12 +26,52 @@
- etcd_is_containerized | bool
- not openshift.common.is_etcd_system_container | bool
-- name: Ensure etcd datadir exists when containerized
+
+# Start secondary etcd instance for third party integrations
+# TODO: Determine an alternative to using thirdparty variable
+
+- name: Create configuration directory
+ file:
+ path: "{{ etcd_conf_dir }}"
+ state: directory
+ mode: 0700
+ when: etcd_is_thirdparty | bool
+
+ # TODO: retest with symlink to confirm it does or does not function
+- name: Copy service file for etcd instance
+ copy:
+ src: /usr/lib/systemd/system/etcd.service
+ dest: "/etc/systemd/system/{{ etcd_service }}.service"
+ remote_src: True
+ when: etcd_is_thirdparty | bool
+
+- name: Create third party etcd service.d directory exists
+ file:
+ path: "{{ etcd_systemd_dir }}"
+ state: directory
+ when: etcd_is_thirdparty | bool
+
+- name: Configure third part etcd service unit file
+ template:
+ dest: "{{ etcd_systemd_dir }}/custom.conf"
+ src: custom.conf.j2
+ when: etcd_is_thirdparty
+
+ # TODO: this task may not be needed with Validate permissions
+- name: Ensure etcd datadir exists
file:
path: "{{ etcd_data_dir }}"
state: directory
mode: 0700
- when: etcd_is_containerized | bool
+ owner: etcd
+ group: etcd
+ recurse: True
+ when: etcd_is_containerized | bool or etcd_is_thirdparty | bool
+
+ # TODO: Determine if the below reload would work here, for now just reload
+- name:
+ command: systemctl daemon-reload
+ when: etcd_is_thirdparty | bool
- name: Disable system etcd when containerized
systemd:
@@ -67,7 +107,7 @@
- name: Write etcd global config file
template:
src: etcd.conf.j2
- dest: /etc/etcd/etcd.conf
+ dest: "{{ etcd_conf_file }}"
backup: true
notify:
- restart etcd