title: Ansible register result of multiple commands
body: <p>I was given a task to verify some routing entries for all Linux server and here is how I did it using an Ansible playbook</p>
  
  <pre><code>---
    - hosts: Linux
      serial: 1
  
      tasks:
        - name: Check first
          command: /sbin/ip route list xxx.xxx.xxx.xxx/24
          register: result
          changed_when: false
  
        - debug: msg="{{result.stdout}}"
  
        - name: Check second
          command: /sbin/ip route list xxx.xxx.xxx.xxx/24
          register: result
          changed_when: false
  
        - debug: msg="{{result.stdout}}"
  </code></pre>
  
  <p>You can see I have to repeat same task for each routing entry and I believe I should be able to avoid this. I tried use <code>with_items</code> loop but got following error message</p>
  
  <pre><code>One or more undefined variables: 'dict object' has no attribute 'stdout'
  </code></pre>
  
  <p>is there a way to register variable for each command and loop over them one by one ?</p>