Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to reference variables defined in attached credentials #2252

Open
dancorrigan1 opened this issue Nov 16, 2024 · 0 comments
Open

Comments

@dancorrigan1
Copy link

SUMMARY

When using AWX/AAP and a custom credential type, It would be great to be able to reference defined variables, specifically vcenter_hostname so I can compose vcenter_hostname dynamically based upon attached credential rather than hardcoding this variable and value into the vmware.yml

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

community.vmware.vmware_vm_inventory

ADDITIONAL INFORMATION

Credential Input configuration

fields:
  - id: username
    type: string
    label: vCenter username
  - id: password
    type: string
    label: vCenter password
    secret: true
  - id: hostname
    type: string
    label: vCenter hostname
  - id: verify_ssl
    type: boolean
    label: Verify SSL

Credential Injector configuration

env:
  VMWARE_HOST: '{{ hostname }}'
  VMWARE_PASSWORD: '{{ password }}'
  VMWARE_USERNAME: '{{ username }}'
  VMWARE_VALIDATE_CERTS: '{{ verify_ssl }}'
extra_vars:
  vcenter_hostname: '{{ hostname }}'

I want to be able to:

plugin: community.vmware.vmware_vm_inventory
strict: false
with_extra_vars: true
...
compose:
  vcenter_hostname: vcenter_hostname 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant