Ansible: 2.6.3 Python: 2.7.12 OS: CentOS 7.4 / Ubuntu 16.04
vim /etc/ansible/hosts
[node4]
# node4 sunday 用户具有sudo权限
192.168.10.104 ansible_ssh_port=22 ansible_ssh_user=ansible ansible_ssh_pass=sundayxxx
- hosts: node4
roles:
- docker
ansible-playbook docker