ansible playbook
web.yaml
[root@comk Desktop]# cat web.yaml
- name: web servers
  remote_user: root
  hosts: webservers

  tasks:
  - name: install httpd
    yum: name=httpd state=present
  - name: httpd service 
    service: name=httpd enabled=yes state=started
wKiom1bJFYjQc5qCAACEVwum7VM405.pngspacer.gif

此非ansible的错误,在单个节点上执行也会报此错误,顾

更换各个节点(即 192.168.1.11 192.168.1.12) 的yum源为163的yum源后解决