【发布时间】:2023-01-24 06:23:28
【问题描述】:
我正在尝试使用 Dell OpenManage Ansible 模块与 PowerEdge 的 iDRAC 进行通信。我无法在网上找到解决我的问题的方法,希望这里有人能够提供帮助。我找到的唯一真正的答案是主机可能没有使用 Python,但正如您从下面的错误中看到的那样,主机实际上正在使用 Python 解释器。它与我运行剧本的虚拟环境中的解释器并不完全相同,我不确定这是否有所作为。
设备: PowerEdge R620 和 iDRAC7
剧本:
---
- hosts: PowerEdge
connection: local
gather_facts: False
tasks:
- name: Get hardware inventory
dellemc_get_system_inventory:
idrac_ip: "IP"
idrac_user: "USER"
idrac_password: "PASSWORD"
validate_certs: false
become: yes
命令:
ansible-playbook playbook.yml -i iDRAC_IP, -u USER --ask-pass -vvv -K
错误:
fatal: [iDRAC_IP]: FAILED! => {
"ansible_facts": {},
"changed": false,
"failed_modules": {
"ansible.legacy.setup": {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"failed": true,
"module_stderr": "Shared connection to iDRAC_IP closed.\r\n",
"module_stdout": "\rcmdstat\r\n\r\tstatus : 2\r\n\r\tstatus_tag : COMMAND PROCESSING FAILED\r\n\r\terror : 252\r\n\r\terror_tag : COMMAND SYNTAX ERROR\r\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 0,
"warnings": [
"Platform unknown on host iDRAC_IP is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-core/2.13/reference_appendices/interpreter_discovery.html for more information."
]
}
},
"msg": "The following modules failed to execute: ansible.legacy.setup\n"
}
【问题讨论】: