Bug #16873

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

Added by Suresh Thirugnanasambandan 9 months ago. Updated 4 months ago.

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

Description

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 7 months ago

Fixes #16873 - Use ansible_fqdn to find facts submitter

History

#1 Updated by Ohad Levy 8 months 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 7 months ago

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

#3 Updated by Anonymous 7 months ago

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

#4 Updated by Daniel Lobato Garcia 7 months ago

  • Target version set to Team Daniel - iteration 6

#5 Updated by Suresh Thirugnanasambandan 4 months ago

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

Also available in: Atom PDF