Project

General

Profile

Bug #22279

Foreman registers duplicates of host again and again on Ansible callback

Added by Romans Krjukovs over 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

Hi,

I have a fresh installation of Foreman 1.16 on a clean host.
Ansible 2.4.2 is installed on the same host and foreman callback is configured.
When i execute some ansible playbook, target host is registered in Foreman (which is expected).
When i execute the same or another playbook targeting same host, another (duplicate) host record with the same hostname
is registered in Foreman. Again and again. Each execution of Ansible playbook produces another
host duplicate in Foreman.

Pls, advise.

Thank You!

Regards
/Romans


Related issues

Has duplicate Ansible - Bug #24090: Ansible Callback Script generates duplicate Foreman Host entriesDuplicate

Associated revisions

Revision d7c4fbf6 (diff)
Added by Ondřej Pražák almost 4 years ago

Fixes #22279 - Do not duplicate hosts on callback (#214)

History

#1 Updated by Martin Angermeier over 4 years ago

  • Related to Bug #24090: Ansible Callback Script generates duplicate Foreman Host entries added

#2 Updated by Ondřej Pražák about 4 years ago

  • Related to deleted (Bug #24090: Ansible Callback Script generates duplicate Foreman Host entries)

#3 Updated by Ondřej Pražák about 4 years ago

  • Has duplicate Bug #24090: Ansible Callback Script generates duplicate Foreman Host entries added

#4 Updated by Ondřej Pražák about 4 years ago

  • Assignee set to Ondřej Pražák

The temporary workaround is to use host FQDN.

Steps to reproduce:

1) Have a host that Foreman does not know about (my-host.example.com)
2) Set up Foreman plugin callback for Ansible to send facts and reports to Foreman
3) Run Ansible on the host using partially qualified host name: ansible -m setup my-host -i myhost,
4) observe the duplicate hosts

#5 Updated by Ondřej Pražák about 4 years ago

  • Status changed from New to Assigned

#6 Updated by The Foreman Bot almost 4 years ago

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

#7 Updated by Marek Hulán almost 4 years ago

  • Fixed in Releases foreman-ansible 2.3.0 added

#8 Updated by Anonymous almost 4 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF