创建用户,设置wheel组sudo不需要密码,然后将用户添加到wheel组,并将用户的公钥传输到节点上: --- - name: Linux Create User and Upload User Public keys hosts: test #remote_user: xxxx #sudo: yes vars: user_1: xiaoxiaoleo tasks: - name: Make sure we have a 'wheel' group group: name: wheel sta…