2015-10-04 04:19:50 +08:00
|
|
|
---
|
|
|
|
- name: Create etcd user
|
|
|
|
user: name=etcd shell=/bin/nologin home=/var/lib/etcd2
|
|
|
|
|
|
|
|
- name: Install etcd binaries
|
2015-11-20 18:18:37 +08:00
|
|
|
copy:
|
2015-10-04 04:19:50 +08:00
|
|
|
src={{ local_release_dir }}/etcd/bin/{{ item }}
|
|
|
|
dest={{ bin_dir }}
|
|
|
|
owner=etcd
|
2015-12-18 05:46:50 +08:00
|
|
|
mode=0755
|
2015-10-04 04:19:50 +08:00
|
|
|
with_items:
|
|
|
|
- etcdctl
|
|
|
|
- etcd
|
2015-12-15 18:49:11 +08:00
|
|
|
notify: restart etcd2
|
2015-10-04 04:19:50 +08:00
|
|
|
|
|
|
|
- name: Create etcd2 binary symlink
|
|
|
|
file: src=/usr/local/bin/etcd dest=/usr/local/bin/etcd2 state=link
|
2015-12-21 19:00:42 +08:00
|
|
|
|
|
|
|
- name: install required python module 'httplib2'
|
|
|
|
apt:
|
|
|
|
name: "python-httplib2"
|
|
|
|
state: present
|
|
|
|
when: inventory_hostname == groups['kube-master'][0] or inventory_hostname == groups['etcd'][0]
|