title: set_fact create a list with items
body: <p>I have task which calls an API and I register the o/p in a  varaible;</p>
  
  <pre><code>- name: Get Object storage account ID
    uri:
      url: 'https://api.softlayer.com/rest/v3.1/SoftLayer_Network_Storage_Hub_Cleversafe_Account/getAllObjects.json?objectFilter={"username":{"operation":"{{ item }}"}}'
      method: GET
      user: abxc
      password: 66c94c447a6ed8a0cf058774fe38
      validate_certs: no
    register: old_existing_access_keys_sl
    with_items: '{{ info["personal"].sl_cos_accounts }}'
  </code></pre>
  
  <p>old_existing_access_keys_sl holds:</p>
  
  <pre><code>"old_existing_access_keys_sl.results": [
   {
              "json": [
                  {
                      "accountId": 12345, 
                      "id": 70825621, 
                      "username": "xyz-11"
                  }
              ]
  },
  {
              "json": [
                  {
                      "accountId": 12345, 
                      "id": 70825621, 
                      "username": "abc-12"
                  }
              ]
  }
  </code></pre>
  
  <p>I want to make a list of <code>id</code>'s for further processing an tried the following task but this did not work:</p>
  
  <pre><code>- name: Create a list of account ids
    set_fact: 
      admin_usernames = "{{ item.json[0].id | list }}"
    with_items: old_existing_access_keys_sl.results
  </code></pre>
  
  <p>I am not sure if that's even possible. I also tried this:</p>
  
  <pre><code>    - name: create a list
        set_fact:
           foo: "{% set foo = [] %}{% for i in old_existing_access_keys_sl.results %}{{ foo.append(i) }}{% endfor %}"
  </code></pre>
  
  <p>foo always comes as blank and as a string:</p>
  
  <pre><code>
  TASK [result] *****************************************************************************************************************************************
  ok: [localhost] =&gt; {
      "foo": ""
  }
  </code></pre>