[deyu1@kvm19 ansible]$ cat roles.yml --- - name: install httpd hosts: webservers roles: - apache
[deyu1@kvm19 ansible]$ ansible-playbook roles.yml PLAY [install httpd] *********************************************************** TASK [Gathering Facts] ********************************************************* ok: [kvm14] ok: [kvm13] TASK [apache : install the latest version of Apache] *************************** ok: [kvm14] ok: [kvm13] TASK [apache : Start service httpd] ******************************************** ok: [kvm14] ok: [kvm13] TASK [apache : firewalld] ****************************************************** ok: [kvm13] ok: [kvm14] TASK [apache : Template a file] ************************************************ ok: [kvm13] ok: [kvm14] PLAY RECAP ********************************************************************* kvm13 : ok=5 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 kvm14 : ok=5 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0