change in reporting in 2.10.1?

75 views
Skip to first unread message

josef....@gmail.com

unread,
Sep 29, 2020, 4:37:16 PM9/29/20
to Ansible Project
After updating (pip uninstall, then re-install) and running an adhoc command, say
ansible -m ping all
I'm seeing many pages of info messages, of the form
task 1: [Continuously incrementing list of hosts]
ok: HOST
ok: HOST
ok: HOST

eventually followed by the output I'm used to seeing.
This seems to be true for playbooks too (they seem to execute fine).

Am I missing a new configuration variable

josef....@gmail.com

unread,
Oct 7, 2020, 11:06:10 AM10/7/20
to Ansible Project
Has anyone else seen this?
To clarify, an ansible -m ping produces a very large amount of progress notes.
Each host generates far greater output
A "task 1:" header, with the host and a list of all previous hosts processed. The list starts at one host, and by the end includes all the hosts. This is followed by several "ok: [HOSTNAME]" (with other tasks there's more detail)
By the end, there's a long list of hosts in the "task 1:" line.
Then the end has several repetitions of the v2.9.X expected summary output
Also should note that I listed the collection version in the subject, ansible-core is at 2.10.0
I've tried modifying ANSIBLE_STDOUT_CALLBACK (in the config and as an environmental variable). FWIW the callback names change in 2.10 (longer qualified names). 

It smells like some new output modifying feature that doesn't make the transition for my setup, but also seems to have something to do with parallelism. 

I've tried several versions of python, no change.
I've tried to keep fairly current with ansible installs, but this behavior makes the current version quite unattractive.
Functionality seems the same.

Matt Martz

unread,
Oct 7, 2020, 11:12:49 AM10/7/20
to ansible...@googlegroups.com
I have not seen this, and I have no idea what could cause this.  Your output (although you only gave a snippet which makes it difficult) appears to be from the `default` callback, however when running `ansible` (the adhoc command) we explicitly prevent using the `default` callback.

Might help to see the output of `ansible-config dump --only-changed`

As well as some pastebin of the full output, including `-vvvv`

When run with `-vvvv` you should see a line that starts with:

Loading callback plugin

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0861228a-94c7-47a5-b73b-2fceac3b062en%40googlegroups.com.


--
Matt Martz
@sivel
sivel.net

josef....@gmail.com

unread,
Oct 7, 2020, 1:36:08 PM10/7/20
to Ansible Project
Thanks

ansible-config dump --only-changed
(I'm running a directory based config, clearly)
ANSIBLE_PIPELINING(/home/fortier/src/ansible/ansible.cfg) = True
CACHE_PLUGIN(/home/fortier/src/ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/home/fortier/src/ansible/ansible.cfg) = .tmp/facts
DEFAULT_CALLBACK_WHITELIST(/home/fortier/src/ansible/ansible.cfg) = ['skippy', 'unixy', 'actionable', 'yaml', 'debug', 'dense']
DEFAULT_FORKS(/home/fortier/src/ansible/ansible.cfg) = 75
DEFAULT_HOST_LIST(/home/fortier/src/ansible/ansible.cfg) = ['/home/fortier/src/ansible/inventory']
DEFAULT_LOAD_CALLBACK_PLUGINS(/home/fortier/src/ansible/ansible.cfg) = True
DEFAULT_LOG_PATH(/home/fortier/src/ansible/ansible.cfg) = /home/fortier/src/ansible/.ansible.log
DEFAULT_ROLES_PATH(/home/fortier/src/ansible/ansible.cfg) = ['/home/fortier/src/ansible/roles']
DEFAULT_STDOUT_CALLBACK(/home/fortier/src/ansible/ansible.cfg) = skippy
DEFAULT_TIMEOUT(/home/fortier/src/ansible/ansible.cfg) = 30
DEFAULT_VAULT_PASSWORD_FILE(/home/fortier/src/ansible/ansible.cfg) = /home/fortier/src/ansible/.ansible_vault_password
INTERPRETER_PYTHON(/home/fortier/src/ansible/ansible.cfg) = auto_silent
RETRY_FILES_ENABLED(/home/fortier/src/ansible/ansible.cfg) = False

I'm a little leary of dumping host names on a public forum
Here's the first screen of output from non-verbose output (edited hosts)
Should give a more complete picture :-)
==============================================
Executing playbook __adhoc_playbook__

PLAY [Ansible Ad-Hoc] **********************************************************

PLAY [Ansible Ad-Hoc] **********************************************************

- Ansible Ad-Hoc on hosts: some_host_group -

PLAY [Ansible Ad-Hoc] **********************************************************

PLAY [Ansible Ad-Hoc] **********************************************************

PLAY [Ansible Ad-Hoc] **********************************************************
PLAY 1: ANSIBLE AD-HOC

TASK [ping] ********************************************************************

TASK [ping] ********************************************************************
ping...

TASK [ping] ********************************************************************

TASK [ping] ********************************************************************
task 1.ok: [potato.not.real.com]
task 1: potato.not.real.comok: [tomato.not.real.com]
task 1: potato.not.real.com tomato.not.real.comok: [garlic.not.real.com]

Here is the first screen of verbose (4) output
==============================================================
ansible 2.10.2
  config file = /home/fortier/src/ansible/ansible.cfg
  configured module search path = ['/home/fortier/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/fortier/.local/lib/python3.8/site-packages/ansible
  executable location = /home/fortier/.local/bin/ansible
  python version = 3.8.6 (default, Oct  6 2020, 12:28:35) [GCC 7.5.0]
Using /home/fortier/src/ansible/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /home/fortier/src/ansible/inventory/not.real as it did not pass its verify_file() method
script declined parsing /home/fortier/src/ansible/inventory/not.real as it did not pass its verify_file() method
auto declined parsing /home/fortier/src/ansible/inventory/not.real as it did not pass its verify_file() method
Parsed /home/fortier/src/ansible/inventory/not.real inventory source with ini plugin
setting up inventory plugins
host_list declined parsing /home/fortier/src/ansible/inventory/by_edu as it did not pass its verify_file() method
script declined parsing /home/fortier/src/ansible/inventory/by_edu as it did not pass its verify_file() method
auto declined parsing /home/fortier/src/ansible/inventory/by_edu as it did not pass its verify_file() method
Parsed /home/fortier/src/ansible/inventory/by_edu inventory source with ini plugin
setting up inventory plugins
host_list declined parsing /home/fortier/src/ansible/inventory/another.not.real as it did not pass its verify_file() method
script declined parsing /home/fortier/src/ansible/inventory/another.not.real as it did not pass its verify_file() method
auto declined parsing /home/fortier/src/ansible/inventory/another.not.real as it did not pass its verify_file() method
Parsed /home/fortier/src/ansible/inventory/another.not.real inventory source with ini plugin
setting up inventory plugins
host_list declined parsing /home/fortier/src/ansible/inventory/shared as it did not pass its verify_file() method
script declined parsing /home/fortier/src/ansible/inventory/shared as it did not pass its verify_file() method
auto declined parsing /home/fortier/src/ansible/inventory/shared as it did not pass its verify_file() method
Parsed /home/fortier/src/ansible/inventory/shared inventory source with ini plugin
redirecting (type: callback) ansible.builtin.skippy to ansible.posix.skippy
Loading collection ansible.posix from /home/fortier/.local/lib/python3.8/site-packages/ansible_collections/ansible/posix
redirecting (type: callback) ansible.builtin.skippy to ansible.posix.skippy
Loading callback plugin ansible.posix.skippy of type stdout, v2.0 from /home/fortier/.local/lib/python3.8/site-packages/ansible_collections/ansible/posix/plugins/callback/skippy.py
redirecting (type: callback) ansible.builtin.skippy to ansible.posix.skippy
Loading callback plugin ansible.posix.skippy of type stdout, v2.0 from /home/fortier/.local/lib/python3.8/site-packages/ansible_collections/ansible/posix/plugins/callback/skippy.py
redirecting (type: callback) ansible.builtin.unixy to community.general.unixy
Loading collection community.general from /home/fortier/.local/lib/python3.8/site-packages/ansible_collections/community/general
Loading callback plugin community.general.unixy of type stdout, v2.0 from /home/fortier/.local/lib/python3.8/site-packages/ansible_collections/community/general/plugins/callback/unixy.py
redirecting (type: callback) ansible.builtin.actionable to community.general.actionable
Loading callback plugin community.general.actionable of type stdout, v2.0 from /home/fortier/.local/lib/python3.8/site-packages/ansible_collections/community/general/plugins/callback/actionable.py
redirecting (type: callback) ansible.builtin.yaml to community.general.yaml
Loading callback plugin community.general.yaml of type stdout, v2.0 from /home/fortier/.local/lib/python3.8/site-packages/ansible_collections/community/general/plugins/callback/yaml.py
redirecting (type: callback) ansible.builtin.debug to ansible.posix.debug
Loading callback plugin ansible.posix.debug of type stdout, v2.0 from /home/fortier/.local/lib/python3.8/site-packages/ansible_collections/ansible/posix/plugins/callback/debug.py
redirecting (type: callback) ansible.builtin.dense to community.general.dense
Loading callback plugin default of type stdout, v2.0 from /home/fortier/.local/lib/python3.8/site-packages/ansible/plugins/callback/default.py

Matt Martz

unread,
Oct 7, 2020, 3:55:33 PM10/7/20
to ansible...@googlegroups.com
There is a small change in behavior between 2.9 and 2.10.

If you are up to testing, take a look at https://github.com/ansible/ansible/pull/59932

I've added your reproducer to that PR

josef....@gmail.com

unread,
Oct 8, 2020, 3:30:03 PM10/8/20
to Ansible Project
I've never pulled the repo and tried to build/test ansible before.
I'd be worried that the time it would take me to set it up might be more then desirable.
Would it be useful to do over the weekend?

Matt Martz

unread,
Oct 8, 2020, 3:36:39 PM10/8/20
to ansible...@googlegroups.com
In the short term, you can work around the issue, by removing whitelist items for stdout plugins other than the one you have listed for stdout:

Related config entries:

DEFAULT_CALLBACK_WHITELIST(/home/fortier/src/ansible/ansible.cfg) = ['skippy', 'unixy', 'actionable', 'yaml', 'debug', 'dense']
DEFAULT_LOAD_CALLBACK_PLUGINS(/home/fortier/src/ansible/ansible.cfg) = True
DEFAULT_STDOUT_CALLBACK(/home/fortier/src/ansible/ansible.cfg) = skippy

The callback whitelist should typically be for any callback that is not a stdout callback.  All of them that you have listed in the whitelist are stdout callbacks.

Only 1 should ever be loaded, that is where the bug is.

Also, if you don't want to use `skippy` as the stdout callback for adhoc, then change the bin_ansible_callback value to False, instead of True.

Reply all
Reply to author
Forward
0 new messages