- name: Install Nginx apt: name: nginx state: present
- name: Restart Apache service: name: apache2 state: restartedIn this example, the task is named "Restart Apache" and it restarts the Apache service using the `service` module. To use the `ansible-playbook-task` module, you simply need to include it in your Ansible playbook and then define your tasks using the appropriate modules. The `ansible-playbook` command is then used to execute the playbook and run the tasks on remote hosts.