## EXAMPLE TASKS IN A PLAY

Ansible Terminal

    ---
    tasks:
    - name: Ensure httpd package is present
      yum:
        name: httpd
        state: latest

    - name: Ensure latest index.html file is present
      copy:
        src: files/index.html
        dest: /var/www/html/

    - name: Restart httpd
      service:
        name: httpd
        state: restarted

This example shows the task list of an Ansible playbook.

1. The first task assures the latest nginx package is installed using yum.
2. The next uses the copy module to assure the latest version of a static home page file has been published.
3. The last task restarts the nginx service with the service module