diff --git a/changelogs/fragments/1645-proxmox-env-passthrough.yml b/changelogs/fragments/1645-proxmox-env-passthrough.yml new file mode 100644 index 0000000000..ce5083707b --- /dev/null +++ b/changelogs/fragments/1645-proxmox-env-passthrough.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - proxmox inventory plugin - add environment variable passthrough (https://github.com/ansible-collections/community.general/pull/1645). diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index 8d6670046d..60623cd2f6 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -27,17 +27,32 @@ DOCUMENTATION = ''' choices: ['community.general.proxmox'] type: str url: - description: URL to Proxmox cluster. + description: + - URL to Proxmox cluster. + - If the value is not specified in the inventory configuration, the value of environment variable C(PROXMOX_URL) will be used instead. default: 'http://localhost:8006' type: str + env: + - name: PROXMOX_URL + version_added: 2.0.0 user: - description: Proxmox authentication user. + description: + - Proxmox authentication user. + - If the value is not specified in the inventory configuration, the value of environment variable C(PROXMOX_USER) will be used instead. required: yes type: str + env: + - name: PROXMOX_USER + version_added: 2.0.0 password: - description: Proxmox authentication password. + description: + - Proxmox authentication password. + - If the value is not specified in the inventory configuration, the value of environment variable C(PROXMOX_PASSWORD) will be used instead. required: yes type: str + env: + - name: PROXMOX_PASSWORD + version_added: 2.0.0 validate_certs: description: Verify SSL certificate if using HTTPS. type: boolean