易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 525|回复: 0
收起左侧

ansible问题解决ansible Data could not be sent to remote host \"192.168.100.71\

[复制链接]
发表于 2022-9-1 11:38:37 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
[root@jdjk11 collect_log]# cat ansible.cfg
" m; I7 i7 K3 s/ f& _[defaults]  K1 E" N8 a3 K$ K5 l
host_key_checking = False
( L" j6 V# C5 m% c4 [( eroles_path = ./roles
/ x1 [( k4 X' ]display_skipped_hosts = False
( q8 J4 p, ~% l8 d( `$ J6 p3 @% t- P* y; ~
# Enable timing information! l+ f  e1 c) o$ W. J) {
callback_whitelist = profile_roles,timer, profile_tasks6 e- X& \7 M4 g3 n' d
deprecation_warnings=False
% j9 e* r  ?7 K+ F! e4 @& ostrategy_plugins =  ~/.ansible/plugins/mitogen-0.3.1/ansible_mitogen/plugins/strategy/! u+ f* Y: W! O5 D, N  F& k
#strategy = mitogen_linear
/ R" H6 [6 {, _1 g2 ~, F" Z# b" R+ e2 l/ s% {
#fact info config# ~- w0 c" X$ Z
gathering = smart2 r# U8 Q! E3 R; u) I3 w
fact_caching_connection = /tmp/facts_cache* E4 m! P& ^1 v; ~" U
fact_caching = jsonfile
- s2 j0 N* ~/ P
1 K( w, n, [# D6 R' R3 ?# The timeout is defined in seconds 5 v" J* H2 Z. z7 l  g
# This is 2 hours # H% e9 I6 o7 r* X1 I# d! u
fact_caching_timeout = 7200' \6 P; u/ V  ]) ~: ?
3 ~; E$ a+ [: z$ u# w
forks = 2' p+ r, e5 b9 v0 I9 t6 ?- W/ M
+ B9 o) k$ M9 c* V8 c( h5 d
[ssh_connection])0 A8 \: N5 z( b1 G! ^, L6 J
# Adding PreferredAuthentications=publickey to the ssh_args line
' m; u, ^0 B  a1 g8 x5 p3 U- v#ssh_args = -o ControlMaster=auto -o ControlPersist=18000 -o PreferredAuthentications=publickey     注释掉这行,windows可以打开。3 O+ l3 l# V' P+ e: V
' W6 w7 l& Z+ \# ?
pipelining = True
) |( F" W& ~3 t6 ~* N2 G/ T! D( P

9 i# K" Q: Z" ^4 y( y8 A1 y) n) R配置windows 的host信息:
9 M4 P% x1 x. X4 P. R% g[root@jdjk11 collect_log]# cat host
; E/ Y" K& S) u! H0 {1 g[remote_group]3 V5 d" l8 d2 j2 S# P+ v$ {
192.168.100.70
) g, Y8 ]5 F8 ]) w, P3 F" C" Z[remote_group:vars]( S6 ]6 i8 M& k3 E$ ^4 `% q& _
ansible_ssh_user=administrator
; T/ m) C' l8 u% E8 ^$ z: Y- lansible_ssh_pass="jdjk@redhat2022"
4 L) k; O+ C7 X3 B2 A" @% t7 v( ransible_ssh_port=5985% L. e* m% _( t8 c
ansible_connection="winrm"5 y& }! u0 ]' v! R$ K- H6 n( P- [
ansible_winrm_server_cert_validation=ignore
" m/ [. c& j" G( k3 e1 K. |2 s' cansible_winrm_scheme=http
2 v/ i8 `' i% Y. |, h" Z#line_no="100"- ?3 L3 \: `2 j% ?0 G9 q
#remote_file="D:\\server\\PisServer\\log\\PisServer.exe20220826log.txt"5 {3 V$ I  K8 s7 u2 |, c% X. o
#remote_host="192.168.100.70"% t& u! o4 ?! ?# }8 f- U8 J
+ E; Q% |7 e: e# d3 J9 u& f( [

4 G6 S5 u& Q9 w( V  i4 X5 x
6 M5 Q. _- t, q; T. v2 J, C/ @; B+ M7 A! m3 T
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-9 07:16 , Processed in 0.048150 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表