ansible output not shown

an extremely simple playbook:

- hosts:
- test-host
tasks:
- name: AAA
ansible.builtin.debug:
msg: AAA

shows results like this:

[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details

PLAY [test-host] **********************************************************************************************************************************************************

PLAY RECAP ***************************************************************************************************************************************************************
test-host : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

so the debug task is either ignored, or had its output suppressed. please, help me make sense of ansible’s behavior and try to figure out which settings could have influenced it.

Group names can’t include dashes (‘-’)

it’s a host, not a group.

воскресенье, 19 июня 2022 г. в 02:49:01 UTC+5, dnmv...@gmail.com:

also, the hostname is altered.

воскресенье, 19 июня 2022 г. в 17:07:49 UTC+5, High Raccoon:

also, the hostname is altered.

Try

hosts: "test1-host:test2-host"

Regards
         Racke

What’s the output of

ansible-config dump | grep -v default

$ ansible-config dump | grep -v default

ANSIBLE_PIPELINING(/home/szelga/automation/ansible.cfg) = True
DEFAULT_HOST_LIST(/home/szelga/automation/ansible.cfg) = [‘/home/szelga/automation/inventory_netbox.yml’, ‘/home/szelga/automation/inventory_static.yml’
, ‘/home/szelga/automation/inventory_test.yml’]
DEFAULT_REMOTE_USER(/home/szelga/automation/ansible.cfg) = root
DEFAULT_STDOUT_CALLBACK(/home/szelga/automation/ansible.cfg) = actionable
DEFAULT_VAULT_PASSWORD_FILE(/home/szelga/automation/ansible.cfg) = /home/szelga/automation/password.txt
HOST_KEY_CHECKING(/home/szelga/automation/ansible.cfg) = False

воскресенье, 19 июня 2022 г. в 21:35:11 UTC+5, uto...@gmail.com:

DEFAULT_STDOUT_CALLBACK was the reason, I’ve set it up a while ago to suppress the excrutiating amount of output and then forgot about it. thank you very much for your help.

воскресенье, 19 июня 2022 г. в 21:35:11 UTC+5, uto...@gmail.com:

@High Racoon

The message is a bit misleading, it is not matching a host so it tries
to match a group (since hosts: allows for host patterns which can
include both), but then it sees the '-' and gives you the message
about invalid groups.

Note for @Todd Lewis

ansible-config dump | grep -v default

no need for that, why you have --only-changed

ansible-config dump --only-changed

Thanks, Brian.
You’ve touched my love-hate-relationship-with-ansible nerve. It’s an anti-feature that

ansible-config --help dump

produces output different from

ansible-config dump --help

the latter being the only way to discover “–only-changed”.

And whether man ansible-config works depends on pip vs. system packaging.

Still, good to know about “–only-changed”.

I need to figure out how to use the argparser library to make those
more congruent.