0
我正在使用Ansible和vCenter配置虛擬機。當我運行我的劇本,我得到一個驗證錯誤:vmware_vm_facts vCenter密碼驗證失敗
Cannot complete login due to an incorrect user name or password.
然而,使用相同的憑據,我能夠手動登錄到vCenter。
這裏是我的簡化劇本:
---
- name: create a new VM on an ESX server
hosts: localhost
connection: local
tasks:
- name: include vars
include_vars:
dir: 'group_vars/prod'
files_matching: 'secret-esx.yml'
- name: gather facts from target host
local_action:
module: vmware_vm_facts
hostname: vi-devops-esx9.lab.vi.local
username: "{{ esx_username }}"
password: "{{ esx_password }}"
validate_certs: no
register: qe_facts
爲什麼我可以訪問的vCenter,但vmware_vm_facts不能用相同的憑據?