Declare variable for included playbook

Hi,

I’m including 1 playbook into another and having problem with passing variables to it - declaring variable in “include” doesn’t work.

What i’m trying to do:
main file:

  • include: prepare-server.yml target_hosts=VALUE

prepare-server.yml playbook:

I don’t believe you can parameterize playbook includes.

Perhaps you can just use “-e” on the command line to specify?

It will be not so usefull - basically i want to use the same hosts parameter value in included playbook as in top level playbook.