---
- name: Install Nginx and copy HTML file
  hosts: webservers
  become: yes
  tasks:
    - name: Update apt cache
      apt:
        update_cache: yes

    - name: Install Nginx
      apt:
        name: nginx
        state: present

    - name: Restart Nginx
      service:
        name: nginx
        state: restarted