You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Oracle ILOM服务器上使用Ansible raw模块修改密码遇阻

Oracle ILOM服务器密码修改的Ansible Playbook问题

背景

我正在编写Ansible Playbook,用于Oracle补丁更新流程中修改服务器密码。和常规密码修改操作一样,需要执行修改命令、输入新密码并再次确认。

我已经通过shell模块结合expect语句成功完成了Linux服务器的密码修改(由于存在二次密码验证提示,无法使用user模块)。但Oracle ILOM服务器并非运行Linux系统——根据ILOM官方文档,ILOM服务处理器(SP)运行自有嵌入式操作系统,配备专用以太网端口以提供带外管理能力;同时也可从服务器主机操作系统(Solaris、Linux、Windows)访问ILOM,实现近似本地操作的远程管理。

当前问题

我可以通过delegate_to指令访问该ILOM服务器,debug模块能正常运行,使用raw模块也能执行初始的密码修改命令,但无法完成二次密码验证的输入操作。我尝试过用&&和;拼接raw命令,但没有成功。目前只有raw模块能与ILOM服务器正常交互,希望找到可行的解决方案。

报错信息

fatal: [main server->ilom-server]: FAILED! => {
"changed": true,
"msg": "non-zero return code",
"rc": 2,
"stderr": "Shared connection to ilom-server closed.\r\n",
"stderr_lines": [
"Shared connection to ilom-server closed."
],
"stdout": "Changing password for user /SP/users/root...\r\r\nEnter new password again: \r\n\r\nConnection being closed due to 15 minutes of inactivity.\r\n\r\r\n\r\n",
"stdout_lines": [
"Changing password for user /SP/users/root...",
"",
"Enter new password again: ",
"",
"Connection being closed due to 15 minutes of inactivity.",
"",
"",
""
]
}

内容的提问来源于stack exchange,提问作者underwater_hiccups

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.18 18:22:39