|
|
[root@jdjk11 collect_log]# cat ansible.cfg
' |/ z7 j, k* H& j3 n. ^[defaults]. {, L, X: K! M
host_key_checking = False: X4 r. a8 J, ?
roles_path = ./roles% w- Q1 R- w' z( M1 ^* s
display_skipped_hosts = False
6 ~3 r8 C% j. P# T# q( z: G& ^ U9 r" T3 @7 ? \$ W
# Enable timing information
! b" q& B0 y3 w; a% @callback_whitelist = profile_roles,timer, profile_tasks+ q2 z1 R: T5 _0 f z
deprecation_warnings=False
2 s# S7 X/ V. T7 H! ^5 G9 `7 Astrategy_plugins = ~/.ansible/plugins/mitogen-0.3.1/ansible_mitogen/plugins/strategy/2 z# A/ V$ c% v2 y$ J- `
#strategy = mitogen_linear" D1 j" J# I s2 {# Q
) R# U# R H# O# t2 e
#fact info config, g0 w; _6 I$ E. ~6 S
gathering = smart- i' w9 t1 J1 L6 F) A8 s1 K
fact_caching_connection = /tmp/facts_cache3 \+ ^7 D: P3 F$ t- }: x6 N
fact_caching = jsonfile
; E! k; A/ A/ f/ ]
5 c2 r7 w" o, e6 I3 e$ d, F# The timeout is defined in seconds + Z, w7 R2 q. A! d
# This is 2 hours 5 ^2 J6 w& I8 J8 {: \
fact_caching_timeout = 72005 q! a) O( B) s9 A* p' r3 J) ]- i
- [8 H7 g* T. Z2 _ s: n
forks = 2. y% ^( v1 X0 b( Q/ D7 v7 K
) Y7 ~# p. v7 e
[ssh_connection])
! {; x- N$ P& Q# Adding PreferredAuthentications=publickey to the ssh_args line
! J2 x7 q9 D1 [+ t#ssh_args = -o ControlMaster=auto -o ControlPersist=18000 -o PreferredAuthentications=publickey 注释掉这行,windows可以打开。- G4 q: B; @ f( X# L/ G' z
) R& Q: D& Q- F$ Y9 N. v/ Q" ~3 _
pipelining = True
- O% x, p; n0 M+ c% Y% @4 Z. m% R8 h0 G5 \; J; ]% P6 _ B8 A n, ?
: t1 a q. G; A% A配置windows 的host信息:
, [7 S9 p# \9 C( ]- K. Z[root@jdjk11 collect_log]# cat host
" ^( g# q8 n: F[remote_group]
( F; n; x/ k* U8 f% C192.168.100.70
6 y: @7 a& \; s3 I) `) J[remote_group:vars]
" _% s3 x: t( l) Z$ @9 {9 |ansible_ssh_user=administrator% n. S8 m5 R% X& F4 d
ansible_ssh_pass="jdjk@redhat2022"
8 z4 t4 p4 M* ?& @! ]( Qansible_ssh_port=59858 p) r- X' ~$ L: v i
ansible_connection="winrm"
; R7 j- a- w1 U6 l; a! B* zansible_winrm_server_cert_validation=ignore" M& K7 R: R5 e$ G4 s
ansible_winrm_scheme=http
1 z& p; X3 a6 ?2 L8 ]/ v8 j#line_no="100"- j& S( l* y& m9 j4 Z
#remote_file="D:\\server\\PisServer\\log\\PisServer.exe20220826log.txt"4 d. J X& I' I
#remote_host="192.168.100.70"* {. \! G* h# N4 s4 I
& n# y$ s' e8 c$ s5 q; h3 o
" G. d9 \, Q# J7 L' I+ e
5 S" A9 H- y7 Z% @8 i" c3 C/ p
% c$ Y# B- p* X F |
|