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