Skip to content

Instantly share code, notes, and snippets.

@alikins
Created March 14, 2017 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alikins/8ea270e21fa233159bc4b1c477d674ee to your computer and use it in GitHub Desktop.
Save alikins/8ea270e21fa233159bc4b1c477d674ee to your computer and use it in GitHub Desktop.
# $PLAYBOOK $ based vars arent ideal because of shell expansion confusion, but approx
# {{PLAYBOOK}} is differently confusing
# pick your magic marker of choice
DEFAULT_ROLES_PATH = get_config(p, DEFAULTS, 'roles_path', 'ANSIBLE_ROLES_PATH', '$ROOT/etc/ansible/roles', value_type='pathlist')
# or
DEFAULT_ROLES_PATH = get_config(p, DEFAULTS, 'roles_path', 'ANSIBLE_ROLES_PATH', '$PLAYBOOK/roles', value_type='pathlist')
# or
DEFAULT_ROLES_PATH = get_config(p, DEFAULTS, 'roles_path', 'ANSIBLE_ROLES_PATH', '$CONFIG/roles', value_type='pathlist')
# or
DEFAULT_ROLES_PATH = get_config(p, DEFAULTS, 'roles_path', 'ANSIBLE_ROLES_PATH', '$CWD/roles', value_type='pathlist')
# okay, this one is weird just to be weird.
DEFAULT_ROLES_PATH = get_config(p, DEFAULTS, 'roles_path', 'ANSIBLE_ROLES_PATH', '$ROLES_PATH/../roles', value_type='pathlist')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment