summaryrefslogtreecommitdiffstats
path: root/roles/etcd/tasks/main.yml
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-07-10 14:46:43 -0400
committerJason DeTiberus <jdetiber@redhat.com>2015-07-10 14:46:43 -0400
commitadd3fbcce31e9db4ea8c76acb9c8579f20581912 (patch)
treeb2734a94adc7d6e05c49c348bf83b566960f01da /roles/etcd/tasks/main.yml
parent5991073262127e4b85e9b1cf4ad7f62fb2c7c345 (diff)
downloadopenshift-add3fbcce31e9db4ea8c76acb9c8579f20581912.tar.gz
openshift-add3fbcce31e9db4ea8c76acb9c8579f20581912.tar.bz2
openshift-add3fbcce31e9db4ea8c76acb9c8579f20581912.tar.xz
openshift-add3fbcce31e9db4ea8c76acb9c8579f20581912.zip
Etcd role updates and playbook updates
- fix firewall conflict issues with co-located etcd and openshift hosts - added os_firewall dependency to etcd role - updated etcd template to better handle clustered and non-clustered installs - added etcd_ca role - generates a self-signed cert to manage etcd certificates, since etcd peer certificates are required to be client and server certs and the openshift ca will only generate client or server certs (not one authorized for both). - renamed openshift_etcd_certs role to etcd_certificates and updated it to manage certificates generated from the CA managed by the etcd_ca role - remove hard coded etcd_port in openshift_facts - updates for the openshift-etcd common playbook - removed etcd and openshift-etcd playbooks from the byo playbooks directory - added a common playbook for setting etcd launch facts - added an openshift-etcd common service playbook - removed unused variables - fixed tests for embedded_{etcd,dns,kube} in openshift_master - removed old workaround for reloading systemd units
Diffstat (limited to 'roles/etcd/tasks/main.yml')
-rw-r--r--roles/etcd/tasks/main.yml36
1 files changed, 35 insertions, 1 deletions
diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml
index 8ed803119..62e29324c 100644
--- a/roles/etcd/tasks/main.yml
+++ b/roles/etcd/tasks/main.yml
@@ -1,6 +1,38 @@
---
- name: Install etcd
- yum: pkg=etcd state=present disable_gpg_check=yes
+ yum: pkg=etcd state=present
+
+- name: Validate permissions on the config dir
+ file:
+ path: "{{ etcd_conf_dir }}"
+ state: directory
+ owner: etcd
+ group: etcd
+ mode: 0700
+
+- name: Validate permissions on certificate files
+ file:
+ path: "{{ item }}"
+ mode: 0600
+ group: etcd
+ owner: etcd
+ when: etcd_url_scheme == 'https'
+ with_items:
+ - "{{ etcd_ca_file }}"
+ - "{{ etcd_cert_file }}"
+ - "{{ etcd_key_file }}"
+
+- name: Validate permissions on peer certificate files
+ file:
+ path: "{{ item }}"
+ mode: 0600
+ group: etcd
+ owner: etcd
+ when: etcd_peer_url_scheme == 'https'
+ with_items:
+ - "{{ etcd_peer_ca_file }}"
+ - "{{ etcd_peer_cert_file }}"
+ - "{{ etcd_peer_key_file }}"
- name: Write etcd global config file
template:
@@ -14,3 +46,5 @@
name: etcd
state: started
enabled: yes
+
+- pause: seconds=10