Bug #16873

Duplicate hosts are created when running the ansible setup module more than once

Added by Suresh Thirugnanasambandan over 1 year ago. Updated about 1 year ago.

Assigned To:Daniel Lobato Garcia
Target version:Foreman - Team Daniel - iteration 6
Difficulty: Pull request:https://github.com/theforeman/foreman_ansible/pull/55
Bugzilla link:


Run the following command twice:
ansible -m setup localhost

See that localhost is created twice in Hosts -> All Hosts

Associated revisions

Revision bd1a3baa
Added by Daniel Lobato García over 1 year ago

Fixes #16873 - Use ansible_fqdn to find facts submitter


#1 Updated by Ohad Levy over 1 year ago

I would also say that localhost should not appear in the host list, it should actually be swapped with the host fqdn (HOSTNAMe, or ansible_fqdn, facter_fqdn etc).

I personally found facter_fqdn to be the most reliable with actual fqdn.

#2 Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_ansible/pull/55 added

#3 Updated by Anonymous over 1 year ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Daniel Lobato Garcia over 1 year ago

  • Target version set to Team Daniel - iteration 6

#5 Updated by Suresh Thirugnanasambandan about 1 year ago

Verified now and it works great. Thanks for the fix.

Also available in: Atom PDF