找回密码
 注册
查看: 526|回复: 0

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-9-1 11:38:37 | 显示全部楼层 |阅读模式
[root@jdjk11 collect_log]# cat ansible.cfg
  }8 d$ {2 i! ~: u& c& ^% @[defaults]# p, v( U$ z& z4 N9 ?
host_key_checking = False
! m1 M: T) ]/ S0 Y8 zroles_path = ./roles0 Q6 n  A* ^% k! {9 h. @( \+ p; c
display_skipped_hosts = False+ I: p" v1 k6 U8 u" J* D" Z# P( T
) a8 D9 Y8 c) O* d6 G( R, F1 b
# Enable timing information8 X6 i9 t7 h! L9 G! p
callback_whitelist = profile_roles,timer, profile_tasks& P; }  x4 j1 R, I( a
deprecation_warnings=False% \( Y- S2 {* W. u7 L) @/ ~
strategy_plugins =  ~/.ansible/plugins/mitogen-0.3.1/ansible_mitogen/plugins/strategy/' s# c8 k7 n3 c
#strategy = mitogen_linear) E. K# u: y) i1 o- a

3 y9 ^3 @& h8 R1 X; Q#fact info config, ?) A0 {5 e- i" Q+ R" `
gathering = smart& M8 w1 M- h. ~
fact_caching_connection = /tmp/facts_cache7 A. e, c9 [( R" z2 i
fact_caching = jsonfile
9 @/ J( Y% g# {' }0 C9 }: v7 }$ w2 L( _0 r  h  D, R
# The timeout is defined in seconds
. G4 G: G! ~0 Q+ L# This is 2 hours
4 A: ^3 x* y% E2 w5 t' I% Yfact_caching_timeout = 7200
$ W7 U( H3 I9 G6 N/ r+ L; L  t% ~  N! V# I' I0 w/ p( o6 B
forks = 2
" D, j2 ]1 r% I7 Q. q0 A0 S. [; \$ S; I& y& J4 S) ~9 q
[ssh_connection])
4 x+ j! o) o0 t& X9 G# Adding PreferredAuthentications=publickey to the ssh_args line" \/ o# R: O& m, w* ?" c( |; x& @
#ssh_args = -o ControlMaster=auto -o ControlPersist=18000 -o PreferredAuthentications=publickey     注释掉这行,windows可以打开。
" z% K/ l  I8 i+ ?/ f9 S1 B5 F9 G, v8 b& v- b4 u2 z
pipelining = True
& C! W3 X& {/ ~. h  F6 F& f6 `/ R
! C" s5 J: G5 w: N* p
配置windows 的host信息:
; S2 q5 z# h" S. Y4 O[root@jdjk11 collect_log]# cat host
: \3 f. m  [0 U! Q. g1 Q# i9 Y2 u[remote_group]  l$ s$ w+ R' |1 S& h8 q
192.168.100.70
, x, m0 s" F$ E5 U[remote_group:vars]: i% Q7 y( a2 v7 f% D% D1 v+ Q
ansible_ssh_user=administrator
3 z2 m6 d1 |! n+ ?0 I& f' kansible_ssh_pass="jdjk@redhat2022"
+ ^- o% v5 c, W2 ]5 n# pansible_ssh_port=5985
, s9 v' X) m  l0 Zansible_connection="winrm"2 n% h4 r6 m6 F5 r3 D
ansible_winrm_server_cert_validation=ignore
4 p3 w) t( W$ ^2 F; |1 _% Jansible_winrm_scheme=http( J& C$ i2 w' i' D( g
#line_no="100"
8 }% I3 l/ o2 E. n#remote_file="D:\\server\\PisServer\\log\\PisServer.exe20220826log.txt"! M4 Q( s  c  g$ ~: b) r$ p  ?( E
#remote_host="192.168.100.70"% _' C$ C$ y5 y, u

8 F9 }' T, f' g) P: I, K% a' m" r! z& U+ _* ^6 S% t
+ ^2 B1 [0 t1 M; E6 d# J) P) t

6 P$ @  C  V) D1 G/ t
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:50 , Processed in 0.020756 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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