mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-25 17:12:50 +00:00
bugfix: update add user command ,check wheather user exist or not ,only create user when user not exist (#2692)
Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
This commit is contained in:
parent
348c9b2d15
commit
6ec705768c
|
|
@ -6,7 +6,7 @@
|
|||
block:
|
||||
- name: Add etcd user
|
||||
command: |
|
||||
useradd -M -c 'Etcd user' -s /sbin/nologin -r etcd || :
|
||||
id etcd &>/dev/null || useradd -M -c 'Etcd user' -s /sbin/nologin -r etcd
|
||||
- name: Create etcd directories
|
||||
command: |
|
||||
if [ ! -d "{{ .item }}" ]; then
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
- name: Add kube user
|
||||
command: |
|
||||
useradd -M -c 'Kubernetes user' -s /sbin/nologin -r kube || :
|
||||
id kube &>/dev/null || useradd -M -c 'Kubernetes user' -s /sbin/nologin -r kube
|
||||
|
||||
- name: Create kube directories
|
||||
command: |
|
||||
|
|
|
|||
Loading…
Reference in New Issue