ansible output not shown

49 views
Skip to first unread message

High Raccoon

unread,
Jun 18, 2022, 11:44:47 AM6/18/22
to Ansible Project
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.

Dick Visser

unread,
Jun 18, 2022, 5:49:01 PM6/18/22
to ansible...@googlegroups.com
Group names can't include dashes ('-')



--
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/2577e03f-d182-479f-92e1-60dc96526789n%40googlegroups.com.
--
Sent from Gmail Mobile

High Raccoon

unread,
Jun 19, 2022, 8:07:49 AM6/19/22
to Ansible Project
it's a host, not a group.

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

High Raccoon

unread,
Jun 19, 2022, 8:08:15 AM6/19/22
to Ansible Project
also, the hostname is altered.

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

Stefan Hornburg (Racke)

unread,
Jun 19, 2022, 9:08:19 AM6/19/22
to ansible...@googlegroups.com
On 19/06/2022 14:08, High Raccoon wrote:
> also, the hostname is altered.
>

Try

hosts: "test1-host:test2-host"

Regards
Racke
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2577e03f-d182-479f-92e1-60dc96526789n%40googlegroups.com <https://groups.google.com/d/msgid/ansible-project/2577e03f-d182-479f-92e1-60dc96526789n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> Sent from Gmail Mobile
>
> --
> 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 <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4316813d-307a-4ab9-8740-cf3322a269afn%40googlegroups.com <https://groups.google.com/d/msgid/ansible-project/4316813d-307a-4ab9-8740-cf3322a269afn%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Automation expert - Ansible and friends
Linux administrator & Debian maintainer
Perl Dancer & conference hopper

OpenPGP_signature

Todd Lewis

unread,
Jun 19, 2022, 12:35:11 PM6/19/22
to Ansible Project
What's the output of

   ansible-config dump | grep -v default

High Raccoon

unread,
Jun 20, 2022, 1:10:31 AM6/20/22
to Ansible Project
$ 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:

High Raccoon

unread,
Jun 20, 2022, 6:32:58 AM6/20/22
to Ansible Project
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:
What's the output of

Brian Coca

unread,
Jun 21, 2022, 10:58:33 AM6/21/22
to Ansible Project
@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



--
----------
Brian Coca

Todd Lewis

unread,
Jun 21, 2022, 11:51:14 AM6/21/22
to Ansible Project
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".

Brian Coca

unread,
Jun 21, 2022, 12:14:04 PM6/21/22
to Ansible Project
I need to figure out how to use the argparser library to make those
more congruent.


--
----------
Brian Coca

Reply all
Reply to author
Forward
0 new messages