I have this playbook:

---
- hosts: localhost
  roles:
    - { role: webserver, tags: ['webserver'], app_role: 'webserver' }
    - { role: dbserver, tags: ['dbserver'], app_role: 'dbserver' }

The two roles have a task with a "name" that has "{{ app_role }}" in it. 
E.g.:

$ cat roles/webserver/tasks/main.yml
---
- name: "Show this is the {{ app_role }} role"
  debug: msg="This is the webserver role"

If I execute the playbook normally, ansible shows the task names with the 
variable substituted in, which is great:

TASK: [webserver | Show this is the webserver role]
TASK: [dbserver | Show this is the dbserver role]

But with --list-tasks, it doesn't do the variable substitution:

$ ansible-playbook role_tags.yml --tags=dbserver,webserver --list-tasks

playbook: role_tags.yml

  play #1 (localhost):
    Show this is the {{ app_role }} role
    Show this is the {{ app_role }} role

Is it possible to get ansible to display the name with the variable 
substitutions applied when running with --list-tasks?

Thanks!

Marc

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/82be82bf-e791-4419-86e0-936f96c2ca78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to