I'm trying to retrieve password from aws secret manager using ansible 2.8 using lookup.
Below things are not working for me:
- hosts: StagingApps
remote_user: staging
gather_facts: false
tasks:
- debug:
var: "{{ lookup('aws_secret', 'staging_mongodb_pass', region='us-east-1') }}"
msg: "{{ query('aws_secret', 'staging_mongodb_pass', region='us-east-1') }}"
environment:
region: 'us-east-1'
Error Message:
FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'aws_secret'. Error was a , original message: 'Requested entry (plugin_type: lookup plugin: aws_secret setting: region ) was not defined in configuration.'"}
It looks like Ansible released this lookup plugin in a broken state. They have an issue and a PR open to fix it:
Very disappointing, as I've been waiting for this plugin for many months.