Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ansible: Dynamic environment variable key names (e.g., if the Env key names are only known at runtime)
- name: Generate Certificates
shell: "printenv"
environment:
- PROVIDER: "{{providername|lower}}"
- "{'LEXICON_{{providername|upper}}_USERNAME':'{{providerusername}}'}"
- "{'LEXICON_{{providername|upper}}_TOKEN':'{{providertoken}}'}"
ignore_errors: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.