Try enclosing the name in double-quotes, e.g., tasks: - name: "Installing {{ item }}" yum: name: "{{ item }}" state: latest with_items: - httpd - firewalld
On Monday, January 29, 2018 at 11:02:58 AM UTC-5, Varun Chopra wrote: > > Hi, > > I'm trying to display the item name in the name of the task but it doesn't > work as intended. > > Here's part of my play: > > tasks: > - name: Installing {{ item }} > yum: > name: "{{ item }}" > state: latest > with_items: > - httpd > - firewalld > > This is what I get when I run the play: > > TASK [Installing {{ item }}] > ****************************************************************************************** > ok: [servera.example.com] => (item=[u'httpd', u'firewalld']) > > Is this supposed to work this way? I > > -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/99067dd5-46b2-4b6b-b9d1-045eb2da66aa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.