ANSIBLE VERSION

ansible-2.2.1.0-1.el6.noarch



OS ENVIRONMENT

Red Hat Enterprise Linux Server release 6.8 (Santiago)

vCenter 6.0


While using the correct credentials for the account being used to complete 
the steps in playbook, a fail is returned stating the credentials are 
incorrect. 


STEPS TO REPRODUCE

Run the following playbook


# Create a new VM
 - name: create new vm...
   hosts: 127.0.0.1
   connection: local
   tasks:
     - vmware_guest:
         hostname: xxx.xxx.local
         username: user@xxx.local
         password: password
         validate_certs: False
         esxi_hostname: hostname
         datacenter: datacenter
         folder: designated folder
         name: newvm
         state: poweredoff
         disk:
         - size_gb: 10
           type: thin
           datastore: datastore
         hardware:
           memory_mb: 8192
           num_cpus: 2
         wait_for_ip_address: False
       delegate_to: 127.0.0.1


EXPECTED RESULTS

VM creation as specified in the playbook


ACTUAL RESULTS

fatal: [127.0.0.1 -> 127.0.0.1]: FAILED! => {
    "apierror": "(vim.fault.InvalidLogin) {\n   dynamicType = <unset>,\n   
dynamicProperty = (vmodl.DynamicProperty) [],\n   msg = 'Cannot complete 
login due to an incorrect user name or password.',\n   faultCause = 
<unset>,\n   faultMessage = (vmodl.LocalizableMessage) []\n}",
    "changed": false,
    "failed": true,
    "invocation": {
        "module_args": {
            "datacenter": "datacenter",
            "disk": [
                {
                    "datastore": "datastore",
                    "size_gb": 10,
                    "type": "thin"
                }
            ],
            "esxi_hostname": "hostname",
            "folder": "designated folder",
            "force": false,
            "hardware": {
                "memory_mb": 8192,
                "num_cpus": 2
            },
            "hostname": "xxx.xxx.local",
            "name": "newvm",
            "name_match": "first",
            "nic": null,
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "state": "poweredoff",
            "template_src": null,
            "username": "user@xxx.local",
            "uuid": null,
            "validate_certs": false,
            "wait_for_ip_address": false
        },
        "module_name": "vmware_guest"
    },
    "msg": "Cannot complete login due to an incorrect user name or 
password."
}


One thing to note: there are a couple special characters in the password of 
the account being used to connect. I'm not certain if these special 
characters could be the hangup. 

I am able to log into the vSphere appliance via three methods with the 
credentials provided in the playbook:


   - via vSphere Web Client
   - via vSphere Client ( thick )
   - via ssh


I am relatively new to Ansible configuration / use. Any insight is 
appreciated.



-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2b58dc3e-320f-4ecb-b9e0-3fdbe2a4b224%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to