Created
March 4, 2016 12:28
-
-
Save BrianAker/1356a19479b984e48cc6 to your computer and use it in GitHub Desktop.
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
| #!/usr/bin/env ANSIBLE_HOSTS="localhost," ansible-playbook | |
| # | |
| # Huh? | |
| # Often I want to render a template but I don't really want to deal with all | |
| # of ansible. So this is command line tool for generating and install a | |
| # jinja template using ansible. No inventory file is required. | |
| # | |
| # Example: | |
| # SRC=./templates/curlrc.j2 DEST=~/.curlrc ./template.yaml | |
| # | |
| --- | |
| - name: template expander | |
| hosts: localhost | |
| connection: local | |
| no_log: True | |
| tasks: | |
| - template: | |
| src: "{{ ansible_env.SRC }}" | |
| dest: "{{ ansible_env.DEST }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment