Last active
November 2, 2016 10:42
-
-
Save olbpetersson/5bef417af32b6ec5f648fe27b70b89d2 to your computer and use it in GitHub Desktop.
This file contains 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
vars.yml | |
--- | |
env: | |
ANSIBLE_LIBRARY: "~/modules" | |
#### | |
test.yml | |
- hosts: all | |
vars_files: | |
- vars.yml | |
environment: "{{env}}" | |
tasks: | |
- name: echo env | |
# THIS WORKS | |
command: echo $ANSIBLE_LIBRARY # {{ lookup('env, 'ANSIBLE_LIBRARY') }} | |
register: ekko | |
- debug: var=ekko | |
- name: My module | |
# BUT THIS FAILS CAUSE IT CANT FIND THE MODULE | |
my_module: | |
input: "this-is-a-test" | |
register: result | |
- debug: var=result | |
### | |
~/modules/my_module.py holds the external module which works if I set ANSIBLE_LIBRARY through bash | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment