Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
With callback variables configured in /etc/sysconfig/foreman and .../foreman-proxy, facts are not updated
Version-Release number of selected component (if applicable):
satellite-6.4.0-3.beta.el7sat.noarch
rubygem-smart_proxy_ansible-2.0.2-3.el7sat.noarch
tfm-rubygem-foreman_ansible_core-2.0.2-1.el7sat.noarch
tfm-rubygem-foreman_ansible-2.0.4-1.el7sat.noarch
ansible-2.4.2.0-2.el7.noarch
How reproducible:
always
Steps to Reproduce:
1. Have Sat and host with role assigned
2. Configure callbacks on Sat as per https://theforeman.org/plugins/foreman_ansible/2.x/index.html#2.1Ansiblecallback - that means:
[root@sat640snap1 ~]# tail -n 2 /etc/sysconfig/foreman
FOREMAN_URL=https://sat640snap1.example.com
FOREMAN_SSL_VERIFY=False
[root@sat640snap1 ~]# tail -n 2 /etc/sysconfig/foreman-proxy
FOREMAN_URL=https://sat640snap1.example.com
FOREMAN_SSL_VERIFY=False
[root@sat640snap1 ~]# grep -e bin_ansible_callbacks -e callback_whitelist /etc/ansible/ansible.cfg
#callback_whitelist = timer, mail
callback_whitelist = foreman
#bin_ansible_callbacks = False
bin_ansible_callbacks = True
3. Restart Sat so changes in /etc/sysconfig/... can take effect
[root@sat640snap1 ~]# katello-service restart
4. Populate facts by manual playbook run as root on the Sat:
[root@sat640snap1 ~]# whoami
root
[root@sat640snap1 ~]# grep -e bin_ansible_callbacks -e callback_whitelist /etc/ansible/ansible.cfg | grep -v '^#'
callback_whitelist = foreman
bin_ansible_callbacks = True
[root@sat640snap1 ~]# export FOREMAN_URL=https://sat640snap1.example.com
[root@sat640snap1 ~]# env | grep FOREMAN
FOREMAN_URL=https://sat640snap1.example.com
[root@sat640snap1 ~]# ansible --private-key ~foreman-proxy/.ssh/id_rsa_foreman_proxy -i inventory.ini -u root -m setup all
rhel74.example.com | SUCCESS => {
[...]
[root@sat640snap1 ~]# echo $?
0
5. Check Hosts -> All hosts -> <host> -> Facts -> ansible_date_time and wait
some time till you see, say, "2 minutes ago" in "Reported at" column
6. Run the role with Hosts -> All hosts -> <host> -> Run Ansible roles
7. Again, check Hosts -> All hosts -> <host> -> Facts -> ansible_date_time
Actual results:
Timestamps in column "Reported at" in step 5. and 7. are almost same (plus the time step 6. took)
Expected results:
In step 7. you should get "less than a minute ago" or something like that. Also values should be changed
The facts updating by button "Run Ansible roles" (step 6.) does not work in generally.
I get this error:
[WARNING]: Failure using method (v2_playbook_on_stats) in callback plugin
(<ansible.plugins.callback.foreman.CallbackModule object at 0x2d88790>):
('Connection aborted.', error(111, 'Connection refused'))
Exit status: 0
Manual running (step 4.) works well and update fact in Satellite.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2018:2927