ansible
PlatoWG
爱生活,爱雪儿。。。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ansible命令行使用普通用户执行命令
背景 ansible已配置root用户来管理客户机,但是管理某服务的时候需要使用普通用户user1 解决办法 ansible -S -R user1 jboss -m shell -a 'whoami' -S, --su run operations with su (deprecated, use become) -R SU_USER, --su-user=SU_USER run operations with su原创 2021-10-13 11:02:27 · 1120 阅读 · 0 评论 -
ansible 命令基础
ansible 主机分组 -m 模块 -a '命令和参数' 给所有主机部署密钥 ansible all -m authorized_key -a "user=root exclusive=true manage_dir=true key='$(< /root/.ssh/id_rsa.pub)'" -k ansible-doc 查看帮助,必须掌握 ansible-doc -l ...原创 2019-03-22 11:27:30 · 248 阅读 · 0 评论 -
自动化工具Ansible的hosts文件配置实例
[linux:children] #指定子组 linux6 linux7 [linux6] 192.168.0.10 192.168.0.11 192.168.0.[12:20] #192.168.0.12——192.168.0.30 [linux7] 192.168.0.87 ansible_ssh_user="root" ansible_ssh_pass="qwe1...原创 2019-03-22 11:22:26 · 1980 阅读 · 0 评论
分享