---
# meta/qb.yml file for qb/yarn/setup
# 
# qb settings for this role. see README.md for more info.
#

# description of the role to show in it's help output.
description: >-
  Install and configure Yarn package manager (for Node).

# prefix for role variables
var_prefix: yarn_setup

# how to get a default for `dir` if it's not provided as the only
# positional argument. if a positional argument is provided it will
# override the method defined here.
# 
# options:
# 
# -   null
#     -   require the value on the command line.
# -   false
#     -   don't provide qb_dir (means doesn't load or save options either).
# -   git_root
#     -   use the git root fof the directory that the `qb` command is invoked
#         from. useful for 'project-centric' commands so they can be invoked
#         from anywhere in the repo.
# -   cwd
#     -   use the directory the `qb` command is invoked form.
# -   {exe: PATH}
#     -   invoke an execuable, passing a JSON serialization of the options 
#         mapping their CLI names to values. path can be relative to role
#         directory.
# -   {find_up: FILENAME}
#     -   starting at the current direcotry and climbing up to parent 
#         directories, use the first one that contains FILENAME. error
#         if none is found.
default_dir: false

# default user to become for play
default_user: null

# set to false to not save options in .qb-options.yml files
save_options: false

# options to pass to ansible-playbook
ansible_options: {}

options:
# - name: example
#   description: an example of a variable.
#   required: false
#   type: boolean # boolean (default) | string
#   short: e
- name: version
  description: Version to install. If missing installs latest stable.
  type: string
  short: v

- name: state
  description: >-
    `present` to install, `absent` to uninstall. `unlinked` should work.
    Not sure what `head` will do. We handle linking with separate `brew_link`
    option.
  see:
  - http://docs.ansible.com/ansible/homebrew_module.html
  short: s
  type:
    one_of:
    - present
    - absent
    - latest
    - head
    - unlinked

- name: brew_link
  description: >-
    When installing on OSX (which uses Homebrew) link the installed packages.
  type: boolean

- name: force
  description: >-
    Force write operations.
  short: f
  type: boolean

- name: brew_create
  description: >-
    On OSX create a Homebrew formula to install the desired version if no
    formula is found.
  type: boolean

- name: brew_tap
  description: >-
    The Homebrew Tap (repo) to use on OSX when creating a new formula for the
    Yarn version.
  short: t
  type: string