mirror of https://github.com/easzlab/kubeasz.git
使用lineinfile替换sed
parent
c17a378efa
commit
193a376635
|
@ -147,5 +147,7 @@
|
|||
- lb
|
||||
tasks:
|
||||
- name: 清理自动生成的PATH
|
||||
shell: sed -i '/kubeasz/d' /etc/profile
|
||||
ignore_errors: true
|
||||
lineinfile:
|
||||
dest: /etc/profile
|
||||
state: absent
|
||||
regexp: 'kubeasz'
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
- /etc/docker
|
||||
|
||||
- name: 写入环境变量$PATH
|
||||
shell: "sed -i '/kubeasz/d' /etc/profile && \
|
||||
echo export PATH={{ bin_dir }}:\\$PATH >> /etc/profile \\# generated by kubeasz"
|
||||
lineinfile:
|
||||
dest: /etc/profile
|
||||
regexp: 'kubeasz'
|
||||
line: 'export PATH={{ bin_dir }}:$PATH # generated by kubeasz'
|
||||
|
||||
- name: 下载证书工具 CFSSL和 kubectl
|
||||
copy: src={{ base_dir }}/bin/{{ item }} dest={{ bin_dir }}/{{ item }} mode=0755
|
||||
|
|
Loading…
Reference in New Issue