2017-11-11 19:14:21 +08:00
|
|
|
- name: prepare some dirs
|
|
|
|
file: name={{ item }} state=directory
|
|
|
|
with_items:
|
|
|
|
- "{{ bin_dir }}"
|
|
|
|
- "{{ ca_dir }}"
|
|
|
|
- /root/.kube
|
|
|
|
- /etc/docker
|
|
|
|
|
2017-11-26 09:34:33 +08:00
|
|
|
#- name: 集群hosts文件更新
|
|
|
|
# copy: src=hosts.j2 dest=/etc/hosts
|
2017-11-11 19:14:21 +08:00
|
|
|
|
|
|
|
- name: 写入环境变量$PATH
|
|
|
|
shell: "echo export PATH={{ bin_dir }}:$PATH >> /etc/profile"
|
|
|
|
|
|
|
|
- name: 下载证书工具 CFSSL
|
|
|
|
copy: src={{ base_dir }}/bin/{{ item }} dest={{ bin_dir }}/{{ item }} mode=0755
|
|
|
|
with_items:
|
|
|
|
- cfssl
|
|
|
|
- cfssl-certinfo
|
|
|
|
- cfssljson
|
|
|
|
|
|
|
|
- name: 分发CA 证书
|
|
|
|
copy: src={{ item }} dest={{ ca_dir }}/{{ item }} mode=0644
|
|
|
|
with_items:
|
|
|
|
- ca.pem
|
|
|
|
- ca-key.pem
|
|
|
|
- ca.csr
|
|
|
|
- ca-config.json
|