Created
November 13, 2015 22:15
-
-
Save sairez/cc637ec7c7fc151e06be to your computer and use it in GitHub Desktop.
grabbing text from json file in an encrypted s3 bucket
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
- name: get secrets from s3 file | |
hosts: localhost | |
connection: local | |
gather_facts: False | |
tasks: | |
- name: grab json from encrypted S3 bucket | |
s3: | |
bucket: 'demo-bucket' | |
object: 'test.json' | |
aws_access_key: "{{lookup('env', 'AWS_ACCESS_KEY_ID')}}" | |
aws_secret_key: "{{lookup('env', 'AWS_SECRET_ACCESS_KEY')}}" | |
region: 'us-east-1' | |
mode: 'getstr' | |
register: info | |
- set_fact: widget_info="{{(info.contents|from_json).widget}}" | |
- debug: msg="{{widget_info.debug}}" | |
- debug: msg="{{widget_info.image}}" | |
- debug: msg="{{widget_info.text}}" | |
- debug: msg="{{widget_info.text.alignment}}" |
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
{"widget": { | |
"debug": "on", | |
"window": { | |
"title": "Sample Konfabulator Widget", | |
"name": "main_window", | |
"width": 500, | |
"height": 500 | |
}, | |
"image": { | |
"src": "Images/Sun.png", | |
"name": "sun1", | |
"hOffset": 250, | |
"vOffset": 250, | |
"alignment": "center" | |
}, | |
"text": { | |
"data": "Click Here", | |
"size": 36, | |
"style": "bold", | |
"name": "text1", | |
"hOffset": 250, | |
"vOffset": 100, | |
"alignment": "center", | |
"onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" | |
} | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment