Skip to content

How to pass credentials to a playbook deploying VMWare VMs #195

Locked Answered by ansibleguy76
slekkus75 asked this question in Q&A
Discussion options

You must be logged in to vote

so, store credentials and give them a name. example vcenter

then you can inject them as extravars by either:

forms property credentials

credentials:
  vmware: vcenter

this injects the vcenter credentials and expose them as the extravar dict variable vmware

then you can do

  • vmware.user
  • vmware.password
  • vmware.host, port, ...

just use them as variables

but sometimes you want to choose the credential name from within the form, so you can then make a text field or expression or enum field and its value will be the credential name. simply add the property asCredential to the field.

name: vmware
type: enum
asCredential: true
default: __auto__
values:
- vcenter1
- vcenter2
- vcenter3
# will mak…

Replies: 3 comments 16 replies

Comment options

You must be logged in to vote
6 replies
@ansibleguy76
Comment options

@ansibleguy76
Comment options

@ansibleguy76
Comment options

@slekkus75
Comment options

@ansibleguy76
Comment options

Comment options

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

Answer selected by ansibleguy76
@slekkus75
Comment options

Comment options

You must be logged in to vote
8 replies
@ansibleguy76
Comment options

@slekkus75
Comment options

@ansibleguy76
Comment options

@ansibleguy76
Comment options

@slekkus75
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants