Created
October 27, 2014 09:36
-
-
Save include/25319e7e2b0f59b4c411 to your computer and use it in GitHub Desktop.
Ansible Vault
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
--- | |
# file: playbooks/plbk_test_vault.yml | |
- hosts: localhost | |
user: include | |
vars_files: | |
- ../files/vault/ec2/prd/svc_master_key.yml | |
tasks: | |
- name: GENERATE mktemp file | |
command: mktemp /Users/include/playbook.XXXXX | |
register: tmpfile | |
- name: LOAD VAULT into mktemp file | |
shell: echo "{{ svc_master_key }}" > "{{ tmpfile.stdout }}" | |
- name: UPLOAD KEY | |
copy: > | |
src="{{ tmpfile.stdout }}" | |
dest=/Users/include/foobar2.pem | |
- name: REMOVE mktemp file | |
file: > | |
path={{ tmpfile.stdout }} | |
state=absent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment