ansible / ansible.builtin / v2.6.10 / lookup / credstash retrieve secrets from Credstash on AWS | "added in version" 2.0 of ansible.builtin" Authors: unknownansible.builtin.credstash (v2.6.10) — lookup
pip
Install with pip install ansible==2.6.10
Credstash is a small utility for managing secrets using AWS's KMS and DynamoDB: https://github.com/fugue/credstash
- name: first use credstash to store your secrets shell: credstash put my-github-password secure123
- name: "Test credstash lookup plugin -- get my github password" debug: msg="Credstash lookup! {{ lookup('credstash', 'my-github-password') }}"
- name: "Test credstash lookup plugin -- get my other password from us-west-1" debug: msg="Credstash lookup! {{ lookup('credstash', 'my-other-password', region='us-west-1') }}"
- name: "Test credstash lookup plugin -- get the company's github password" debug: msg="Credstash lookup! {{ lookup('credstash', 'company-github-password', table='company-passwords') }}"
- name: Example play using the 'context' feature hosts: localhost vars: context: app: my_app environment: production tasks: - name: "Test credstash lookup plugin -- get the password with a context passed as a variable" debug: msg="{{ lookup('credstash', 'some-password', context=context) }}" - name: "Test credstash lookup plugin -- get the password with a context defined here" debug: msg="{{ lookup('credstash', 'some-password', context=dict(app='my_app', environment='production')) }}"
table: default: credential-store description: name of the credstash table to query required: true _terms: description: term or list of terms to lookup in the credit store required: true type: list region: description: AWS region version: description: Credstash version profile_name: description: AWS profile to use for authentication env: - name: AWS_PROFILE aws_access_key_id: description: AWS access key ID env: - name: AWS_ACCESS_KEY_ID aws_session_token: description: AWS session token env: - name: AWS_SESSION_TOKEN aws_secret_access_key: description: AWS access key env: - name: AWS_SECRET_ACCESS_KEY
_raw: description: - value(s) stored in Credstash