Merge pull request #177 from Antergone/master

修复原有PATH被覆盖问题
pull/682/head
gjmzj 2018-05-04 08:21:34 +08:00 committed by GitHub
commit e450fe30ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -138,3 +138,14 @@
- "{{ ca_dir }}"
- "/root/.kube/"
- "/etc/docker/"
- hosts:
- kube-master
- kube-node
- deploy
- etcd
- lb
tasks:
- name: 清理自动生成的PATH
shell: sed -i '/kubeasz/d' /etc/profile
ignore_errors: true

View File

@ -7,8 +7,8 @@
- /etc/docker
- name: 写入环境变量$PATH
shell: "sed -i '/export PATH=/d' /etc/profile && \
echo export PATH={{ bin_dir }}:$PATH >> /etc/profile"
shell: "sed -i '/kubeasz/d' /etc/profile && \
echo export PATH={{ bin_dir }}:\\$PATH >> /etc/profile \\# generated by kubeasz"
- name: 下载证书工具 CFSSL和 kubectl
copy: src={{ base_dir }}/bin/{{ item }} dest={{ bin_dir }}/{{ item }} mode=0755