ansible-host file

博客展示了Kafka安装脚本重构中Ansible的配置内容,包括使用cd命令进入相关目录,用vim编辑host_vars/hosts文件,设置了如默认ssh连接用户、私钥文件等参数,还给出了转载来源。

cd install-script-refactor/kafka/ansible
vim host_vars/hosts
[all:vars]
ansible_user=developer /默认ssh 连接用户
#ansible_passwd=7paExIyZ
#ansible_become=yes //允许升级权限,相当于ansible_sudo或ansible_su
#become_user=root//允许设置设置特殊权限的用户,相当于ansible_sudo_user或ansible_su_user
#become_method=sudo//允许设置特殊权限的方法
#ansible_sudo_user=hudson //允许设置您成为通过特权升级的用户
ansible_ssh_private_key_file=/home/developer/.ssh/authorized_keys//连接时使用的私钥文件

转载于:https://www.cnblogs.com/ppp1314520818/p/10560133.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值