Ansible: removing hosts
<p>I know that one can add host with the following task:</p>

<pre><code>- name: Add new instance to host group
  add_host:
    hostname: '{{ item.public_ip }}'
    groupname: "tag_Name_api_production"
  with_items: ec2.instances
</code></pre>

<p>But I can't seem to find a way to remove a host from inventory. Is there any way to do this?</p>