Skip to content

Can you use keystore entries in task templates #1361

Answered by ansibleguy
smitch35 asked this question in Q&A
Discussion options

You must be logged in to vote

Greetings @smitch35
As far as I have seen - the keystore can only be used to supply the credentials to run tasks and clone repositories.
Essentially what you want seems to be to pass extra-vars with secret values to Ansible so you can switch secrets on a per-execution basis, right?

Practical usage of some use-cases like these used a 'secrets.yml' either in the global 'vars' directory (placement in the same depth as your playbooks) or in a role-specific vars-file.
See the documentation for directory structure and search paths.

Example 'secrets.yml':

vmware_a:
  selector1: !vault |
    ...
  selector2: !vault |
    ...
  selector3: !vault |
    ...
# NOTE: 'selectorN' is just a generic plac…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@smitch35
Comment options

@ansibleguy
Comment options

Answer selected by smitch35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants