using with linux and creeating shareable playbooks

41 views
Skip to first unread message

aussi...@gmail.com

unread,
Mar 17, 2015, 11:24:37 PM3/17/15
to battle...@googlegroups.com
G`Day !

Great project.
I am up and running with battleschool on my new Ubuntu Utopic laptop.

In an effort to give back I want to build out and share a repo in the same vane as https://github.com/spencergibb/ansible-osx but for Ubuntu.

One thing I am stuck on is where to extract out any vars from these playbooks so that they are generic ?
example: https://gist.github.com/aussielunix/c37821ace10198a785b7

Rather than having a vars_files: hard coded in this playbook where would I put the vars so they can live external to these re-useable/shareable playbooks ?


Cheers
Mick Pollard
@aussielunix

Spencer Gibb

unread,
Mar 18, 2015, 5:12:34 PM3/18/15
to battle...@googlegroups.com
Ansible can have variables from lots of locations.  You'll need to provide defaults somewhere.

From command line:
  -e EXTRA_VARS, --extra-vars=EXTRA_VARS
see http://docs.ansible.com/playbooks_variables.html#passing-variables-on-the-command-line
Reply all
Reply to author
Forward
0 new messages