>       Take a look again at the example in 
> https://docs.ansible.com/ansible/latest/modules/import_playbook_module.html. 
>
> To me it does not know where 
>
>
>   roles: 
>     - role: testrole1 
>       tags: testrole1 
>
> belongs. Should it be 
>
> - hosts: mywebservers 
>   gather_facts: yes 
>
>   roles: 
>     - role: testrole1 
>       tags: testrole1 
>
> #- import_playbook: another.yml 
>
> i.e. those roles are related to mywebservers? Or are they related to 
> all hosts as defined in another.yml? 
>
>
>
testrole1 belongs to mywebservers. It isn't related to all hosts as defined 
in another.yml file. However, another.yml file needs to be called first. I 
tried using pre_tasks with import_playbook. It doesn't work either. I also 
tried using include, still not working. Since another.yml file contains a 
list of roles, it is supposed to be import_playbook, but I'm not sure how 
to make import_playbook working in current_playbook.yml file.

Thanks again,

- Xinhuan

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ea2a316c-0d8e-4641-9e94-d10e708b3ea5%40googlegroups.com.

Reply via email to