Hi Michael, Any update on this? Has this been implemented since the original post? or are there any plans now?
Thanks Mumshad On Sunday, 21 September 2014 15:50:32 UTC-4, Michael DeHaan wrote: > > Technically possible, but perhaps a little frustrating to implement :) > > We'd be happy if someone wanted to take a crack at it, though I think in > general we're waiting for some refactoring to happen first so there's more > one common entity to ask about variable "context" questions before going at > it. > > (It should be noted that inventory variables, because they can be > different per host, will also never show up in task names) > > > > On Fri, Sep 19, 2014 at 9:32 AM, Marc Abramowitz <[email protected] > <javascript:>> wrote: > >> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/82be82bf-e791-4419-86e0-936f96c2ca78%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/82be82bf-e791-4419-86e0-936f96c2ca78%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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/8519c84c-a84e-47a9-9fd4-b7533c9fe013%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
