Skip to content

Instantly share code, notes, and snippets.

@pixelistik
Last active November 11, 2015 22:26
Show Gist options
  • Save pixelistik/3ef7d562ecaee3ce3283 to your computer and use it in GitHub Desktop.
Save pixelistik/3ef7d562ecaee3ce3283 to your computer and use it in GitHub Desktop.
Example for Ansible vars from ejson file
---
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