title: How do I re-gather device facts to remove any partitioned disks?
body: <p>I'm building a role for which I'm trying to gather disks without any partitions using</p>
  <pre class="lang-yaml prettyprint-override"><code>disks: &quot;{{ ansible_devices | dict2items | selectattr('key', 'match', '^sd.*')  |  selectattr('value.partitions', 'match', '{}' )  | list  }}&quot;
  </code></pre>
  <p>and then mount on the partition. But, as I'm running over a loop I wanted to update the list/disks when the mount and partition is completed.</p>
  <p>For example, if my list at the start looks like</p>
  <pre class="lang-yaml prettyprint-override"><code>disks: [sdb,sdc,sdd,sde]
  </code></pre>
  <p>when the partitioning and mounting on <code>sdb</code> using the <code>mount</code> module in Ansible is done, the list should be updated and look something like this</p>
  <pre class="lang-yaml prettyprint-override"><code>disks: [sdc,sdd,sde]
  </code></pre>
  <p>How can I achieve this?</p>