The vcenter_rest modules need to be authenticated. There are two different
Note
This solution requires that you call the modules from the local machine.
You need to export some environment variables in your shell before you call the modules.
$ export VMWARE_HOST=vcenter.test $ export VMWARE_USER=myvcenter-user $ export VMWARE_password=mypassword $ ansible-playbook my-playbook.yaml
All the vcenter_rest modules accept the following arguments:
vcenter_host
vcenter_username
vcenter_password
It’s common to run a test environment without a proper SSL certificate configuration.
To ignore the SSL error, you can use the vcenter_validate_certs: no
argument or export VMWARE_VALIDATE_CERTS=no
to set the environment variable.
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/scenario_guides/vmware_rest_scenarios/authentication.html