ansible become与sudo

 

 ansible sudo 即将变更为become

 

配置

[s21]
#192.168.1.21  ansible_ssh_user=i  ansible_ssh_pass=i
192.168.1.21  ansible_ssh_user=i  ansible_ssh_private_key_file=/home/i/.ssh/id_rsa ansible_become=true ansible_become_user=root  ansible_become_pass='i'

 

测试 

命令运行用户root

ssh用户i

切换sudo为root

 

posted @ 2018-12-01 16:20  EngineTang  阅读(4773)  评论(0编辑  收藏  举报