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

Issue with vmware_export_ovf module when user doesn't have permission to hosts #2137

Open
ledz0 opened this issue Aug 21, 2024 · 0 comments
Open

Comments

@ledz0
Copy link

ledz0 commented Aug 21, 2024

So, the module vmware_export_ovf cannot export OVF template from Vcenter when the user does not have permission to READ hosts.
It works when use WebUI or PowerCLI, but issue is with vmware_export_ovf ansible module for this account.

COMPONENT NAME

vmware_export_ovf

ANSIBLE VERSION
root@5dd574f1cf28:/# ansible --version
ansible [core 2.14.3]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.11.2 (main, May  2 2024, 11:59:08) [GCC 12.2.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
# /root/.ansible/collections/ansible_collections
Collection       Version
---------------- -------
community.vmware 4.5.0
OS / ENVIRONMENT

Debian 12 Bookworm

STEPS TO REPRODUCE

---
- hosts: localhost
  become: yes
  gather_facts: true
  tasks:
  - name: VM EXPORT | Export VM to OVF
    vmware_export_ovf:
      validate_certs: false
      hostname: "any_vsphere.local"
      username: "[email protected]"
      password: "any_password"
      name: "vm_template"
      download_timeout: 60
      export_dir: /build

EXPECTED RESULTS

Export OVF template via ansible module vmware_export_ovf

ACTUAL RESULTS
TASK [VM EXPORT | Export VM to OVF] *****************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "get exception: (vim.fault.NoPermission) {\n   dynamicType = <unset>,\n   dynamicProperty = (vmodl.DynamicProperty) [],\n   msg = 'Permission to perform this operation was denied.',\n   faultCause = <unset>,\n   faultMessage = (vmodl.LocalizableMessage) [],\n   object = 'vim.HostSystem:host-11',\n   privilegeId = 'System.Read',\n   missingPrivileges = (vim.fault.NoPermission.EntityPrivileges) []\n}"}


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