Q:

syntax error with ansible playbook role when using block

I am trying to use blocks with ansible 2.1 inside a role task file but getting a sytax error as copied below:
---
- name: transferring debian artifact to server
  - block:
     - copy:
         src: "{{ lookup('fileglob','{{base_git_path}}testserver/target/*.deb', wantlist=true) | first }}"
         dest: "{{base_destination_path}}"
         owner: xyz
         group: xyz
         mode: 644
         become: true
    rescue:
     - debug: msg="error while locating debian file in tmp directory"

syntax error
fatal: [akka_1]: FAILED! => {"failed": true, "reason": "Syntax Error while loading YAML.\n\n\nThe error appears to have been in '/home/user/test/ansible/testproj/playbooks/roles/tmp3/tasks/synchronize.yml': line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- name: transferring debian artifact to server\n  - block:\n  ^ here\n"}

A:

block should be on the same indentation level as other tasks.  
Also blocks can't have names. ⟵ update: this has been changed since Ansible 2.3, blocks can have names.  
Correct syntax:
---
# transferring debian artifact to server
- block:
    - copy:
        src: ...
  rescue:
    - debug: msg="..."

