title: How can I manipuate each item in a list when using Ansible?
body: <p>The special variable <code>ansible_role_names</code> contains a list with roles names in my play. For example</p>
  <pre><code>&quot;ansible_role_names&quot;: [
      &quot;geerlingguy.nfs&quot;, 
      &quot;ANXS.openssh&quot;, 
      &quot;robertdebock.bootstrap&quot;, 
      &quot;robertdebock.squid&quot;
  ]
  </code></pre>
  <p>However what I want to access is this list with everything before the dot removed.</p>
  <pre><code>&quot;roles&quot;: [
      &quot;nfs&quot;, 
      &quot;openssh&quot;, 
      &quot;bootstrap&quot;, 
      &quot;squid&quot;    ]
  </code></pre>