Created
October 17, 2013 00:28
-
-
Save darkone23/7017340 to your computer and use it in GitHub Desktop.
Ansible searches for files in different places depending on which part of ansible you are using. The `getcwd` role just looks up your current working directory and provides it as the variable 'basedir'. This way, you can do things like this:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - hosts: webservers | |
| vars_files: | |
| - vars/web-archival-config.yaml | |
| roles: | |
| - getcwd | |
| - role: cron-job | |
| frequency: hourly | |
| template: '{{ basedir + "templates/archive.sh" }}' | |
| dest: ~/bin/archive.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment