Ah, gotcha. Thanks.

I'm still struggling to get with_items to work tho. Trying this:
---
- name: Do stuff to stuff
  hosts: localhost
  tasks:
    - name: set fact
      set_fact:
        thing: otherstuff
    - name: myrole
      include_role:
        name: myrole
      vars:
        thing: "asdf"
    - name: myrole
      with_items:
        - "aone"
        - "atwo"
      include_role:
        name: myrole
      vars:
        thing: "{{ item }}"

causes this error: failed: [localhost] (item=aone) => {"failed": true, 
"item": "aone", "msg": "No role was specified to include"}.
The first (non-loop) task runs fine.

On Tuesday, October 4, 2016 at 3:37:17 PM UTC+2, Brian Coca wrote:
>
> Sorry for the confusion, _role_name is internal, you need to set name:
>
>
>
> - include_role:
>      name: myrole
>
>
> ​and this should also work now:
>
> - name: not a role name
>    - include_role:
>         name: myrole
>   ​
>
> ----------
> Brian Coca
>

-- 
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/fc9b0c9b-a96d-4a39-a30c-728b9bfad5d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to