Problem:
When I run Ansible roles on host it will create a 2 additional hosts each time with the same name in Foreman.
The Ansible roles (or the Job & tasks) themself finish ok, with just a
427: 403 Client Error: Forbidden
428: Exit status: 0
as last 2 lines.
Output of hammer after 2 runs:
—|--------------------------|-----------------------------------------------------|--------------------------------|-----------------|-------------------|--------------
ID | NAME | OPERATING SYSTEM | HOST GROUP | IP | MAC | GLOBAL STATUS |
---|---|---|---|---|---|---|
40 | etta-filary | 192.168.221.167 | 00:50:56:a5:a4:bb | OK | ||
34 | etta-filary | Red Hat Enterprise Linux Server release 7.6 (Maipo) | DevOps RedHat Family Templates | 192.168.221.167 | 00:50:56:a5:a4:bb | OK |
41 | etta-filary | OK | ||||
36 | etta-filary | 192.168.221.167 | 00:50:56:a5:a4:bb | Error | ||
37 | etta-filary | Error | ||||
— | -------------------------- | ----------------------------------------------------- | -------------------------------- | ----------------- | ------------------- | -------------- |
Expected outcome:
Ansible roles are executed and no new host is created in Foreman, but the collected facts are merged to existing host.
Foreman and Proxy versions:
foreman-1.20.2-1.el7.noarch
foreman-cli-1.20.2-1.el7.noarch
foreman-debug-1.20.2-1.el7.noarch
foreman-installer-1.20.2-1.el7.noarch
foreman-postgresql-1.20.2-1.el7.noarch
foreman-proxy-1.20.2-1.el7.noarch
foreman-selinux-1.20.2-1.el7.noarch
foreman-vmware-1.20.2-1.el7.noarch
tfm-rubygem-foreman_ansible-2.2.11-2.fm1_20.el7.noarch
tfm-rubygem-foreman_ansible_core-2.1.2-2.fm1_20.el7.noarch
tfm-rubygem-foreman_bootdisk-14.0.0-1.fm1_20.el7.noarch
tfm-rubygem-foreman_remote_execution-1.6.7-1.fm1_20.el7.noarch
tfm-rubygem-foreman_remote_execution_core-1.1.4-1.el7.noarch
tfm-rubygem-foreman-tasks-0.14.3-1.fm1_20.el7.noarch
tfm-rubygem-foreman-tasks-core-0.2.5-2.fm1_20.el7.noarch
tfm-rubygem-foreman_templates-6.0.3-2.fm1_20.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.15.1-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.13-1.fm1_20.el7.noarch
tfm-rubygem-hammer_cli_foreman_templates-0.1.2-1.fm1_20.el7.noarch
Foreman and Proxy plugin versions:
Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)
logs