我正在设置一个Rundeck实例(版本3.0.7-CE),并尝试同时使用WinRM Node Executor Python和Ansible清单插件。
以下是我的项目设置详细信息:
如果使用文件作为节点源,则可以正常运行命令和执行脚本。
但是,如果我使用 Ansible Resource Model Source ,并且当我运行一个简单的命令(例如“主机名”)时,出现以下错误:
Exception in thread Thread-1:
16:20:41 Traceback (most recent call last):
16:20:41 File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner
16:20:41 self.run()
16:20:41 File "/usr/lib64/python2.7/threading.py", line 765, in run
16:20:41 self.__target(*self.__args, **self.__kwargs)
16:20:41 File "/var/lib/rundeck/libext/cache/py-winrm-plugin-1.0.7/winrm_session.py", line 143, in get_response
16:20:41 response = self.session.run_ps(self.exec_command, out_stream=self.o_stream, err_stream=self.e_stream)
16:20:41 File "/var/lib/rundeck/libext/cache/py-winrm-plugin-1.0.7/winrm_session.py", line 63, in run_ps
16:20:41 rs = self.run_cmd('powershell -encodedcommand {0}'.format(encoded_ps),out_stream=out_stream, err_stream=err_stream)
16:20:41 File "/var/lib/rundeck/libext/cache/py-winrm-plugin-1.0.7/winrm_session.py", line 46, in run_cmd
16:20:41 shell_id = self.protocol.open_shell()
16:20:41 File "/usr/lib/python2.7/site-packages/winrm/protocol.py", line 157, in open_shell
16:20:41 res = self.send_message(xmltodict.unparse(req))
16:20:41 File "/usr/lib/python2.7/site-packages/winrm/protocol.py", line 234, in send_message
16:20:41 resp = self.transport.send_message(message)
16:20:41 File "/usr/lib/python2.7/site-packages/winrm/transport.py", line 256, in send_message
16:20:41 response = self._send_message_request(prepared_request, message)
16:20:41 File "/usr/lib/python2.7/site-packages/winrm/transport.py", line 261, in _send_message_request
16:20:41 response = self.session.send(prepared_request, timeout=self.read_timeout_sec)
16:20:41 File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 644, in send
16:20:41 r = dispatch_hook('response', hooks, r, **kwargs)
16:20:41 File "/usr/lib/python2.7/site-packages/requests/hooks.py", line 31, in dispatch_hook
16:20:41 _hook_data = hook(hook_data, **kwargs)
16:20:41 File "/usr/lib/python2.7/site-packages/requests_credssp/credssp.py", line 448, in response_hook
16:20:41 response = self.handle_401(response, **kwargs)
16:20:41 File "/usr/lib/python2.7/site-packages/requests_credssp/credssp.py", line 487, in handle_401
16:20:41 out_token, step_name = credssp_gen.send(in_token)
16:20:41 File "/usr/lib/python2.7/site-packages/requests_credssp/credssp.py", line 158, in credssp_generator
16:20:41 ts_request.check_error_code()
16:20:41 File "/usr/lib/python2.7/site-packages/requests_credssp/asn_structures.py", line 125, in check_error_code
16:20:41 raise NTStatusException(status)
16:20:41 NTStatusException: Received error status from the server: (3221225581) STATUS_LOGON_FAILURE 0xc000006d
如果有人可以点亮一些灯光,那就太好了。
谢谢大家。
答案 0 :(得分:0)
确保rundeck用户可以访问Ansible配置(通常在/ etc / ansible / *上)和清单文件/文件夹。检查该权限。