登录远控节点是一个账号,切换到root账号执命令。 需要在hosts文件里配置用户密码 name:changeuser remoteuser:ubuntu gatherfacts:no become:yes becomemethod:susudo becomeuser:root tasks: name:catfile shell:catvarlogtest。log