Skip to content

Instantly share code, notes, and snippets.

@gkspranger
Last active April 12, 2017 13:28
Show Gist options
  • Save gkspranger/7443c71515c96836966887aa173ab5af to your computer and use it in GitHub Desktop.
Save gkspranger/7443c71515c96836966887aa173ab5af to your computer and use it in GitHub Desktop.
---
# my custom variable file that defines where my roles and playbooks are
# both directories are siblings of the inventories file
# inventory_dir is a VAR provided to us by Ansible
# .... http://docs.ansible.com/ansible/playbooks_variables.html#magic-variables-and-how-to-access-information-about-other-hosts
roles_dir: "{{ inventory_dir | regex_replace('inventories$', 'roles') }}"
playbooks_dir: "{{ inventory_dir | regex_replace('inventories$', 'playbooks') }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment