Ansible: Register a VM to sphere ( vcenter)

Hi ,

I am trying to register a VM through vmware-cmd command line as below but it fails with the following error message.
has anybody tried this earlier. any help is appreciated.

I just need to register a VM to vcenter ( or in other words register to the datastore associated with ESX host managed by vcenter).

  name: Register a VM template to VSphere
  shell:  vmware-cmd -H '{{hostname}}' -U  '{{username}}' -P '{{password}}' --vihost '{{esxi_hostname1}}' -s register {{ template_file_path }}
  register: result
  ignore_errors: true

********************************************************

   fatal: []: FAILED! => {
    "changed": true, 
    "cmd": "vmware-cmd -H 'X.X.X.X' -U 'administrator@vsphere.local' -P 'XXX23' --vihost 'X.x.x.x' -s register /vmfs/volumes/EVC_Store1/myvgpu_clone2/myvgpu_clone2.vmx", 
    "delta": "0:00:00.004544", 
    "end": "2017-07-30 06:26:24.922754", 
    "failed": true, 
    "invocation": {
        "module_args": {
            "_raw_params": "vmware-cmd -H 'xxxx' -U 'xxxx@vsphere.local' -P 'Admin!23' --vihost 'xxxx' -s register /vmfs/volumes/EVC_Store1/myvgpu_clone2/myvgpu_clone2.vmx", 
            "_uses_shell": true, 
            "chdir": null, 
            "creates": null, 
            "executable": null, 
            "removes": null, 
            "warn": true
        }
    }, 
    "rc": 127, 
    "start": "2017-07-30 06:26:24.918210", 
    "stderr": "/bin/sh: vmware-cmd: command not found", 
    "stderr_lines": [
        "/bin/sh: vmware-cmd: command not found"
    ], 
    "stdout": "", 
    "stdout_lines": []
}

    I am trying to register a VM through vmware-cmd command line as below
but it fails with the following error message.
has anybody tried this earlier. any help is appreciated.

< snip/>

     "stderr": "/bin/sh: vmware-cmd: command not found",

It clearly say the command doesn't exist.
Either it's missing or not in users PATH.

Use full path or search the list for "interactive shell" and "non interactive shell" to learn more about the shell feature when it comes to PATH.

this command is only available in the vmware CLI i think