Ansible 2 doesn't show what a task does without "name:". Can I get the old behavior back (like in Ansible 1.x)?

Hello

In Ansible 1.x a line like this:

  • lineinfile: dest=/root/.bashrc regexp=“^export VISUAL=” line=“export VISUAL=‘vim’”

Gives the following output when I execute the playbook:

TASK: [lineinfile dest=/root/.bashrc regexp=“^export VISUAL=” line=“export VISUAL=‘vim’”] ***
ok: [xy]

However, with Ansible 2 this got changed. The exact same line gives the following output when the playbook is executed:
TASK [lineinfile] **************************************************************

ok: [xy]

This is not very helpful. I do realize that I can use “name:” but I’d rather have the old behavior as it always shows me what ansible is doing and not just a name I made up. Is there a setting the get the old behavior back?

short answer: no

longer answer:

Ansible pre 1.8 templated names and that behavior is back in 2.0 (it
was a bug that it did not work in 1.8/1.9), this plus the usage of
secrets in some tasks would accidentally disclose information onto the
screen most users want to keep private. So we decided to change the
'default name' of tasks to only be the module instead of the module
and all its parameters and err on the side of safety and security.

This is an example of what we avoid now:
` - shell: echo {{mypassword}} | script.sh`

I understand, thank you very much.