diff options
author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-07-16 12:15:51 -0400 |
---|---|---|
committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-07-16 12:15:51 -0400 |
commit | 68d6fdf1c1c8244b3bd2ccdf77499d9127592368 (patch) | |
tree | 0e28786664b825c97b33188bf36c42387fe59a51 /roles/etcd/tasks/main.yml | |
parent | a1fe1b25b588ba995192b99e44a7950ee0c6e032 (diff) | |
parent | f831779404b0147d6a92935cd8b77de3e25f2bec (diff) | |
download | openshift-68d6fdf1c1c8244b3bd2ccdf77499d9127592368.tar.gz openshift-68d6fdf1c1c8244b3bd2ccdf77499d9127592368.tar.bz2 openshift-68d6fdf1c1c8244b3bd2ccdf77499d9127592368.tar.xz openshift-68d6fdf1c1c8244b3bd2ccdf77499d9127592368.zip |
Merge pull request #341 from detiber/sdodson-etcd-playbook
External clustered etcd support
Diffstat (limited to 'roles/etcd/tasks/main.yml')
-rw-r--r-- | roles/etcd/tasks/main.yml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml new file mode 100644 index 000000000..79a91dfde --- /dev/null +++ b/roles/etcd/tasks/main.yml @@ -0,0 +1,52 @@ +--- +- name: Install etcd + 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: + src: etcd.conf.j2 + dest: /etc/etcd/etcd.conf + notify: + - restart etcd + +- name: Enable etcd + service: + name: etcd + state: started + enabled: yes + register: start_result + +- pause: seconds=30 + when: start_result | changed |