これは私がこのコードを実行したときに発生するエラーです。私はこのエラーが出るのはなぜホストは文字列でエラーが発生する可能性があります
An exception occurred during task execution. The full traceback is: Traceback (most recent call last): File "/var/folders/zt/s5ykx9_n4y9611h_k_gj_vx00000gn/T/ansible_vYePRK/ansible_module_vsphere_guest.py", line 1879, in main() File "/var/folders/zt/s5ykx9_n4y9611h_k_gj_vx00000gn/T/ansible_vYePRK/ansible_module_vsphere_guest.py", line 1748, in main viserver.connect(vcenter_hostname, username, password) File "/Library/Python/2.7/site-packages/pysphere/vi_server.py", line 71, in connect ,FaultTypes.PARAMETER_ERROR) pysphere.resources.vi_exception.VIException: [Parameter Error]: 'host' should be a string with the ESX/VC url.
fatal: [9.1.142.86]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_name": "vsphere_guest"}, "module_stderr": "Traceback (most recent call last):\n File \"/var/folders/zt/s5ykx9_n4y9611h_k_gj_vx00000gn/T/ansible_vYePRK/ansible_module_vsphere_guest.py\", line 1879, in \n main()\n File \"/var/folders/zt/s5ykx9_n4y9611h_k_gj_vx00000gn/T/ansible_vYePRK/ansible_module_vsphere_guest.py\", line 1748, in main\n viserver.connect(vcenter_hostname, username, password)\n File \"/Library/Python/2.7/site-packages/pysphere/vi_server.py\", line 71, in connect\n
,FaultTypes.PARAMETER_ERROR)\npysphere.resources.vi_exception.VIException: [Parameter Error]: 'host' should be a string with the ESX/VC url.\n", "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false}
:
[my-host]
19.3.112.97 ansible_ssh_pass=mypass ansible_ssh_user=root
プレイブックは
---
- hosts: localhost
connection: local
tasks:
- vsphere_guest:
guest: newvm001
vmware_guest_facts: yes
エラーですか?
これは、同じコードセクションの8番目の質問です。そしてあなたは明確化のために求められた答えを受け入れていませんか? – tedder42