Follow the steps Step-1 1.Take two ubuntu 16.04 machines and enable ssh between them 2.Update host file information on master machine 3.Then do ping test between master and worker machine 4. create apache2.yml playbook --- - hosts: servers #server host or group name sudo: yes tasks: - name: install apache2 apt: name=apache2 update_cache=yes state=latest - name: enabled mod_rewrite apache2_module: name=rewrite state=present notify: - restart apache2 handlers: - name: restart apache2 service: name=apache2 state=restarted Then run ansible play book on master machine then check on both master and worker machine public ip on browser to confirm apache was installed or not . Installing Tomcat After this run play book Then you can check on browser of ...