Approach ok but your indentation is off. with_items should be at the same level as include_role.
On Thu, 20 Jun 2019 at 16:19, Punit Jain <[email protected]> wrote: > Hi, > > I have a role with multiple task files and I include only few of them in > my different playbook > > I did below but it gives an error: > > tasks: > - name: check configuration > include_role: > name: config_check > tasks_from: "{{ item }}" > with_items: > - ldap > - dns > > it gave an error: > ERROR! invalid options for include_role: with_items > > so I try below : > > tasks: > - name: check ldap configuration > include_role: > name: config_check > tasks_from: ldap > > - name: check dns configuration > include_role: > name: config_check > tasks_from: dns > > Is this correct design approach ? > > Thanks and regards > Punit > > -- > 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/CAFXWBQKQcdhpKDeLwJKiQ%2BOHkFA6UqgRV2a7Kr-FCc%2BWJHn%2BUg%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CAFXWBQKQcdhpKDeLwJKiQ%2BOHkFA6UqgRV2a7Kr-FCc%2BWJHn%2BUg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Sent from a mobile device - please excuse the brevity, spelling and punctuation. -- 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/CAL8fbwNfoDWeTJVAQzaH5Ldve3K_mRhr1-enWDJu-vYbrLQGJg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
