Using Ansible set_fact to create a dictionary from register results
<p>In Ansible I've used <code>register</code> to save the results of a task in the variable <code>people</code>. Omitting the stuff I don't need, it has this structure:</p>

<pre class="lang-json prettyprint-override"><code>{
    "results": [
        {
            "item": {
                "name": "Bob"
            },
            "stdout": "male"
        },
        {
            "item": {
                "name": "Thelma"
            },
            "stdout": "female"
        }
    ]
}
</code></pre>

<p>I'd like to use a subsequent <code>set_fact</code> task to generate a new variable with a dictionary like this:</p>

<pre class="lang-json prettyprint-override"><code>{
    "Bob": "male",
    "Thelma": "female"
}
</code></pre>

<p>I guess this might be possible but I'm going round in circles with no luck so far.</p>