I've playbook A to include roles to conduct an operation. Now I want to 
create playbook B to import/include playbook A but want to pass 'hosts' 
value to A. In other words, I want to make A to work dynamically with 
different hosts depending on the playbooks (B/C/D/E/etc.) that 
include/import it.

I've searched around and couldn't find a good way to do it, I'm running 
Ansible 2.7.10

I tried in Playbook B like [ -import_playbook playbook-A.yml    
my-host='host_B_name'] (in playbook A [ hosts: {{'my-host'}}]), but got 
error: Invalid variable name in vars specified for PlaybookInclude: 
'my-host' is not a valid variable name

Any help or idea here?

Thanks in advance!

-- 
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/6c789234-f6f7-406d-afa0-ad781f54e8b0%40googlegroups.com.

Reply via email to