V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  defunct9  ›  全部回复第 101 页 / 共 247 页
回复总数  4923
1 ... 97  98  99  100  101  102  103  104  105  106 ... 247  
2021-03-26 11:58:43 +08:00
回复了 zunxiongchen 创建的主题 Linux Ansible playbook become 模块一定要配置 sudoers 为 ALL 吗?
哦哦哦

一、在 ansible 配置文件里,ansible.cfg 配
[privilege_escalation]
become_exe=’sudo su -‘

或者干脆环境变量里指出 ANSIBLE_BECOME_EXE=’sudo su -‘

二、再使用 become
remote_user: remote-user
become: yes
become_user: informatica-user
become_method: su
2021-03-26 10:49:08 +08:00
回复了 zunxiongchen 创建的主题 Linux Ansible playbook become 模块一定要配置 sudoers 为 ALL 吗?
直接用 test_user 执行不行么
2021-03-25 20:36:35 +08:00
回复了 yah0130 创建的主题 程序员 软件工作室征名
泽奇诺工作室
1 ... 97  98  99  100  101  102  103  104  105  106 ... 247  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2237 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 41ms · UTC 11:20 · PVG 19:20 · LAX 04:20 · JFK 07:20
Developed with CodeLauncher
♥ Do have faith in what you're doing.