Last active
November 11, 2015 22:26
-
-
Save pixelistik/3ef7d562ecaee3ce3283 to your computer and use it in GitHub Desktop.
Example for Ansible vars from ejson file
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
--- | |
hosts: local | |
gather_facts: no | |
user: pi | |
tasks: | |
- name: locally decrypt vars | |
local_action: command ejson decrypt -o vars.json vars.ejson | |
- include_vars: vars.json | |
- name: add users | |
local_action: shell echo "{{ item.username }} - {{ item.password }}" >> tmp | |
when: ejson_vars_decrypted == "true" | |
with_items: | |
- "{{ users }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment