Over riding host in playbook

Hi,

I guess i have a relatively simple question, which i could not find a way to do. Currently I always need to edit my playbook file to specify the host group to run it for.

Is it possible to override the host specified in the file, from command line when i call the playbook ? What i am planning to do is publish playbooks internally which everyone can use just override hosts and maybe pass an argument for a file or something which the playbook will take and send it to all hosts.

Thanks for the help !!

You can pass vars from the command line via --extra-vars=“var1=blah”

http://ansible.cc/docs/playbooks2.html#passing-variables-on-the-command-line

HTH,

  • Jeremiah

Awesome!! Thanks, dont know how i missed it, Should read again …

Happy to help! This development on this project is awesomely fast-paced, I find something new every time I come back to it.