easzlab / kubeasz

使用Ansible脚本安装K8S集群,介绍组件交互原理,方便直接,不受国内网络环境影响
https://github.com/easzlab/kubeasz
10.54k stars 3.53k forks source link

当ansible_ssh_user不为root时01.prepare.yml中最后两个步骤会报错 #1324

Closed tzwken closed 1 year ago

tzwken commented 1 year ago

What happened? 发生了什么问题?

image

即便在ansible-playbook命令行中增加了-b参数一样会报错,ansible_env的SSH_CLIENT这个变量只有在root的情况下才会设置。 解决办法: 在playbook文件中增加become: True,命令行中去掉-b参数 image

What did you expect to happen? 期望的结果是什么?

非root用户也能正常安装,在很多管理系统中,root用户的密码和key都是要严格保密起来的。只能用普通用户通过sudo进行安装

How can we reproduce it (as minimally and precisely as possible)? 尽可能最小化、精确地描述如何复现问题

如上

Anything else we need to know? 其他需要说明的情况

No response

Kubernetes version k8s 版本

1.22.2

Kubeasz version

3.3.5, 3,5,2测试后均有这个问题

OS version 操作系统版本

centos7.9

Related plugins (CNI, CSI, ...) and versions (if applicable) 其他网络插件等需要说明的情况

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

recall704 commented 8 months ago

https://github.com/easzlab/kubeasz/issues/1272