Project

General

Profile

Actions

Bug #32188

closed

Verbose log outputs for Ansible jobs are reported to all Hosts present on the Job.

Added by Ondřej Ezr almost 4 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1912941

and is also related to https://bugzilla.redhat.com/show_bug.cgi?id=1943347

Description of problem:

When enabling very very verbose mode in Ansible settings, the task is generating the debug output log for all hosts present on the Job.
This also applies for deprecation warnings.

Version-Release number of selected component (if applicable):

Red Hat Satellite (build: 6.8.2)

How reproducible:

Enable the debug mode on settings and run the Ansible Default Template on more than one host.

Steps to Reproduce:
1. Enable Ansible Debug (-vvv)
2. Select two or more hosts.
3. Run ansible roles on those hosts.
4. Check the host execution logs.

Actual results:

The host execution log is showing the debug log for all hosts present on the inventory instead of just the expected host.

It's causing a huge delay on the task and makes the time 10 times slower.

Expected results:

Just the debug output log for the host that the output is being checked.

Additional info:

Following a small snippet of debug code example.

~~
32:
TASK [Gathering Facts] *************************************************
33:
task path: /tmp/d20210105-14561-c8qt93/project/playbook.yml:2
34:
<host1.example.com> ESTABLISH SSH CONNECTION FOR USER: root
35:
<host1.example.com> SSH: EXEC sshpass -d8 ssh -o ProxyCommand=none -o StrictHostKeyChecking=no -o Port=22 -o 'IdentityFile="/usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy"' -o 'User="root"' -o ConnectTimeout=10 host1.example.com '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
36:
<host2.example.com> ESTABLISH SSH CONNECTION FOR USER: root
37:
<host2.example.com> SSH: EXEC sshpass -d8 ssh -o ProxyCommand=none -o StrictHostKeyChecking=no -o Port=22 -o 'IdentityFile="/usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy"' -o 'User="root"' -o ConnectTimeout=10 host2.example.com '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
~~

From the other BZ:

An example where the error is on host2, however, the playbook is ran against host1:

~~
TASK [Gathering Facts]**********************************************************
ok: [host1]
[DEPRECATION WARNING]: Distribution redhat 8.3 on host host2 should use /usr/libexec/platform-python, but is using
/usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the
discovered platform python for this host. See
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature will
be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
~~


Related issues 1 (0 open1 closed)

Related to Ansible - Bug #32030: Using localhost in a playbook causes a crashClosedOndřej EzrActions
Actions

Also available in: Atom PDF