title: Ansible block vars
body: <p>How can I set in Ansible block vars (visible only for tasks in block) ?</p>
  
  <p>I tried:</p>
  
  <pre><code>---
  - hosts: test
    tasks:
      - block:
  
         - name: task 1
           shell: "echo {{item}}"
  
        with_items:
          - one
          - two
  </code></pre>
  
  <p>but it seems that it's a wrong way.</p>